diff options
author | Sandra McCann <samccann@redhat.com> | 2023-04-24 11:00:42 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-24 10:00:42 -0500 |
commit | 2f57c2d9bc4338a168d32b469dc2a6087a637a39 (patch) | |
tree | 79d95eaea6f50d1376c30295ec3f2ad583137716 | |
parent | ddf298097c26a855fa58137dba1931c28c4d22aa (diff) | |
download | ansible-2f57c2d9bc4338a168d32b469dc2a6087a637a39.tar.gz |
fix become yes/no to true/false (#80515) (#80601)
(cherry picked from commit f05abd4540f7c26ae7296c59a3fdd579c4bf3070)
Co-authored-by: Akira Yokochi <akira6592@gmail.com>
16 files changed, 32 insertions, 32 deletions
diff --git a/docs/docsite/rst/network/dev_guide/developing_resource_modules_network.rst b/docs/docsite/rst/network/dev_guide/developing_resource_modules_network.rst index fe16c57e95..eefedb67f1 100644 --- a/docs/docsite/rst/network/dev_guide/developing_resource_modules_network.rst +++ b/docs/docsite/rst/network/dev_guide/developing_resource_modules_network.rst @@ -551,7 +551,7 @@ The following example walks through the integration tests for the ``vyos.vyos.vy file: "{{ test_case_to_run }}" vars: ansible_connection: local - ansible_become: no + ansible_become: false with_first_found: "{{ test_items }}" loop_control: loop_var: test_case_to_run diff --git a/docs/docsite/rst/network/getting_started/network_differences.rst b/docs/docsite/rst/network/getting_started/network_differences.rst index 2ae583f18e..ef9e97c3fa 100644 --- a/docs/docsite/rst/network/getting_started/network_differences.rst +++ b/docs/docsite/rst/network/getting_started/network_differences.rst @@ -56,13 +56,13 @@ Several network platforms support privilege escalation, where certain tasks must Using ``become`` for privilege escalation ----------------------------------------- -Use the top-level Ansible parameter ``become: yes`` with ``become_method: enable`` to run a task, play, or playbook with escalated privileges on any network platform that supports privilege escalation. You must use either ``connection: network_cli`` or ``connection: httpapi`` with ``become: yes`` with ``become_method: enable``. If you are using ``network_cli`` to connect Ansible to your network devices, a ``group_vars`` file would look like: +Use the top-level Ansible parameter ``become: true`` with ``become_method: enable`` to run a task, play, or playbook with escalated privileges on any network platform that supports privilege escalation. You must use either ``connection: network_cli`` or ``connection: httpapi`` with ``become: true`` with ``become_method: enable``. If you are using ``network_cli`` to connect Ansible to your network devices, a ``group_vars`` file would look like: .. code-block:: yaml ansible_connection: ansible.netcommon.network_cli ansible_network_os: cisco.ios.ios - ansible_become: yes + ansible_become: true ansible_become_method: enable For more information, see :ref:`Become and Networks<become_network>` diff --git a/docs/docsite/rst/network/user_guide/network_debug_troubleshooting.rst b/docs/docsite/rst/network/user_guide/network_debug_troubleshooting.rst index d0fbcd6383..ce28e0bcf1 100644 --- a/docs/docsite/rst/network/user_guide/network_debug_troubleshooting.rst +++ b/docs/docsite/rst/network/user_guide/network_debug_troubleshooting.rst @@ -634,7 +634,7 @@ For example: Suggestions to resolve: - Use ``connection: ansible.netcommon.network_cli`` and ``become: yes`` + Use ``connection: ansible.netcommon.network_cli`` and ``become: true`` Proxy Issues diff --git a/docs/docsite/rst/network/user_guide/platform_cnos.rst b/docs/docsite/rst/network/user_guide/platform_cnos.rst index 0044847407..cb79c7dac2 100644 --- a/docs/docsite/rst/network/user_guide/platform_cnos.rst +++ b/docs/docsite/rst/network/user_guide/platform_cnos.rst @@ -28,7 +28,7 @@ Connections available Connection Settings ``ansible_connection: ansible.netcommon.network_cli`` - |enable_mode| supported: use ``ansible_become: yes`` + |enable_mode| supported: use ``ansible_become: true`` with ``ansible_become_method: enable`` and ``ansible_become_password:`` @@ -51,7 +51,7 @@ Example CLI ``group_vars/cnos.yml`` ansible_network_os: community.network.cnos ansible_user: myuser ansible_password: !vault... - ansible_become: yes + ansible_become: true ansible_become_method: enable ansible_become_password: !vault... ansible_ssh_common_args: '-o ProxyCommand="ssh -W %h:%p -q bastion01"' diff --git a/docs/docsite/rst/network/user_guide/platform_dellos10.rst b/docs/docsite/rst/network/user_guide/platform_dellos10.rst index cdffdd5545..35686b9b7c 100644 --- a/docs/docsite/rst/network/user_guide/platform_dellos10.rst +++ b/docs/docsite/rst/network/user_guide/platform_dellos10.rst @@ -28,7 +28,7 @@ Connections available Connection Settings ``ansible_connection: ansible.netcommon.network_cli`` - |enable_mode| supported: use ``ansible_become: yes`` + |enable_mode| supported: use ``ansible_become: true`` with ``ansible_become_method: enable`` and ``ansible_become_password:`` @@ -52,7 +52,7 @@ Example CLI ``group_vars/dellos10.yml`` ansible_network_os: dellemc.os10.os10 ansible_user: myuser ansible_password: !vault... - ansible_become: yes + ansible_become: true ansible_become_method: enable ansible_become_password: !vault... ansible_ssh_common_args: '-o ProxyCommand="ssh -W %h:%p -q bastion01"' diff --git a/docs/docsite/rst/network/user_guide/platform_dellos6.rst b/docs/docsite/rst/network/user_guide/platform_dellos6.rst index ae8083de8d..c4df091e6c 100644 --- a/docs/docsite/rst/network/user_guide/platform_dellos6.rst +++ b/docs/docsite/rst/network/user_guide/platform_dellos6.rst @@ -28,7 +28,7 @@ Connections available Connection Settings ``ansible_connection: ansible.netcommon.network_cli`` - |enable_mode| supported: use ``ansible_become: yes`` + |enable_mode| supported: use ``ansible_become: true`` with ``ansible_become_method: enable`` and ``ansible_become_password:`` @@ -51,7 +51,7 @@ Example CLI ``group_vars/dellos6.yml`` ansible_network_os: dellemc.os6.os6 ansible_user: myuser ansible_password: !vault... - ansible_become: yes + ansible_become: true ansible_become_method: enable ansible_become_password: !vault... ansible_ssh_common_args: '-o ProxyCommand="ssh -W %h:%p -q bastion01"' diff --git a/docs/docsite/rst/network/user_guide/platform_dellos9.rst b/docs/docsite/rst/network/user_guide/platform_dellos9.rst index ac1f52f63d..91e525e43c 100644 --- a/docs/docsite/rst/network/user_guide/platform_dellos9.rst +++ b/docs/docsite/rst/network/user_guide/platform_dellos9.rst @@ -28,7 +28,7 @@ Connections available Connection Settings ``ansible_connection: ansible.netcommon.network_cli`` - |enable_mode| supported: use ``ansible_become: yes`` + |enable_mode| supported: use ``ansible_become: true`` with ``ansible_become_method: enable`` and ``ansible_become_password:`` @@ -51,7 +51,7 @@ Example CLI ``group_vars/dellos9.yml`` ansible_network_os: dellemc.os9.os9 ansible_user: myuser ansible_password: !vault... - ansible_become: yes + ansible_become: true ansible_become_method: enable ansible_become_password: !vault... ansible_ssh_common_args: '-o ProxyCommand="ssh -W %h:%p -q bastion01"' diff --git a/docs/docsite/rst/network/user_guide/platform_enos.rst b/docs/docsite/rst/network/user_guide/platform_enos.rst index 3cf17c30ee..4ba9a76196 100644 --- a/docs/docsite/rst/network/user_guide/platform_enos.rst +++ b/docs/docsite/rst/network/user_guide/platform_enos.rst @@ -28,7 +28,7 @@ Connections available Connection Settings ``ansible_connection: ansible.netcommon.network_cli`` - |enable_mode| supported: use ``ansible_become: yes`` + |enable_mode| supported: use ``ansible_become: true`` with ``ansible_become_method: enable`` and ``ansible_become_password:`` @@ -53,7 +53,7 @@ Example CLI ``group_vars/enos.yml`` ansible_network_os: community.network.enos ansible_user: myuser ansible_password: !vault... - ansible_become: yes + ansible_become: true ansible_become_method: enable ansible_become_password: !vault... ansible_ssh_common_args: '-o ProxyCommand="ssh -W %h:%p -q bastion01"' diff --git a/docs/docsite/rst/network/user_guide/platform_eos.rst b/docs/docsite/rst/network/user_guide/platform_eos.rst index 588118ef27..a48c780960 100644 --- a/docs/docsite/rst/network/user_guide/platform_eos.rst +++ b/docs/docsite/rst/network/user_guide/platform_eos.rst @@ -32,8 +32,8 @@ Connections available |enable_mode| supported: |br| supported: |br| - * use ``ansible_become: yes`` * ``httpapi`` - with ``ansible_become_method: enable`` uses ``ansible_become: yes`` + * use ``ansible_become: true`` * ``httpapi`` + with ``ansible_become_method: enable`` uses ``ansible_become: true`` with ``ansible_become_method: enable`` Returned Data Format ``stdout[0].`` ``stdout[0].messages[0].`` @@ -56,7 +56,7 @@ Example CLI ``group_vars/eos.yml`` ansible_network_os: arista.eos.eos ansible_user: myuser ansible_password: !vault... - ansible_become: yes + ansible_become: true ansible_become_method: enable ansible_become_password: !vault... ansible_ssh_common_args: '-o ProxyCommand="ssh -W %h:%p -q bastion01"' @@ -110,7 +110,7 @@ Example eAPI ``group_vars/eos.yml`` ansible_network_os: arista.eos.eos ansible_user: myuser ansible_password: !vault... - ansible_become: yes + ansible_become: true ansible_become_method: enable proxy_env: http_proxy: http://proxy.example.com:8080 diff --git a/docs/docsite/rst/network/user_guide/platform_icx.rst b/docs/docsite/rst/network/user_guide/platform_icx.rst index ee87b7682b..204312c5bc 100644 --- a/docs/docsite/rst/network/user_guide/platform_icx.rst +++ b/docs/docsite/rst/network/user_guide/platform_icx.rst @@ -28,7 +28,7 @@ Connections available Connection Settings ``ansible_connection: ansible.netcommon.network_cli`` - |enable_mode| supported: use ``ansible_become: yes`` with + |enable_mode| supported: use ``ansible_become: true`` with ``ansible_become_method: enable`` and ``ansible_become_password:`` Returned Data Format ``stdout[0].`` @@ -49,7 +49,7 @@ Example CLI ``group_vars/icx.yml`` ansible_network_os: community.network.icx ansible_user: myuser ansible_password: !vault... - ansible_become: yes + ansible_become: true ansible_become_method: enable ansible_become_password: !vault... ansible_ssh_common_args: '-o ProxyCommand="ssh -W %h:%p -q bastion01"' diff --git a/docs/docsite/rst/network/user_guide/platform_ios.rst b/docs/docsite/rst/network/user_guide/platform_ios.rst index c7bd9ab768..70cf8c84ad 100644 --- a/docs/docsite/rst/network/user_guide/platform_ios.rst +++ b/docs/docsite/rst/network/user_guide/platform_ios.rst @@ -28,7 +28,7 @@ Connections available Connection Settings ``ansible_connection: ansible.netcommon.network_cli`` - |enable_mode| supported: use ``ansible_become: yes`` with + |enable_mode| supported: use ``ansible_become: true`` with ``ansible_become_method: enable`` and ``ansible_become_password:`` Returned Data Format ``stdout[0].`` @@ -51,7 +51,7 @@ Example CLI ``group_vars/ios.yml`` ansible_network_os: cisco.ios.ios ansible_user: myuser ansible_password: !vault... - ansible_become: yes + ansible_become: true ansible_become_method: enable ansible_become_password: !vault... ansible_ssh_common_args: '-o ProxyCommand="ssh -W %h:%p -q bastion01"' diff --git a/docs/docsite/rst/network/user_guide/platform_ironware.rst b/docs/docsite/rst/network/user_guide/platform_ironware.rst index dbb2c41226..da1530bac1 100644 --- a/docs/docsite/rst/network/user_guide/platform_ironware.rst +++ b/docs/docsite/rst/network/user_guide/platform_ironware.rst @@ -28,7 +28,7 @@ Connections available Connection Settings ``ansible_connection: ansible.netcommon.network_cli`` - |enable_mode| supported: use ``ansible_become: yes`` + |enable_mode| supported: use ``ansible_become: true`` with ``ansible_become_method: enable`` and ``ansible_become_password:`` @@ -52,7 +52,7 @@ Example CLI ``group_vars/mlx.yml`` ansible_network_os: community.network.ironware ansible_user: myuser ansible_password: !vault... - ansible_become: yes + ansible_become: true ansible_become_method: enable ansible_become_password: !vault... ansible_ssh_common_args: '-o ProxyCommand="ssh -W %h:%p -q bastion01"' diff --git a/docs/docsite/rst/network/user_guide/platform_nxos.rst b/docs/docsite/rst/network/user_guide/platform_nxos.rst index 3794cfc331..7391238948 100644 --- a/docs/docsite/rst/network/user_guide/platform_nxos.rst +++ b/docs/docsite/rst/network/user_guide/platform_nxos.rst @@ -29,7 +29,7 @@ Connections available Connection Settings ``ansible_connection:`` ``ansible_connection:`` ``ansible.netcommon.network_cli`` ``ansible.netcommon.httpapi`` - |enable_mode| supported: use ``ansible_become: yes`` not supported by NX-API + |enable_mode| supported: use ``ansible_become: true`` not supported by NX-API with ``ansible_become_method: enable`` and ``ansible_become_password:`` @@ -53,7 +53,7 @@ Example CLI ``group_vars/nxos.yml`` ansible_network_os: cisco.nxos.nxos ansible_user: myuser ansible_password: !vault... - ansible_become: yes + ansible_become: true ansible_become_method: enable ansible_become_password: !vault... ansible_ssh_common_args: '-o ProxyCommand="ssh -W %h:%p -q bastion01"' diff --git a/docs/docsite/rst/network/user_guide/platform_routeros.rst b/docs/docsite/rst/network/user_guide/platform_routeros.rst index ff404e6672..842ad4c424 100644 --- a/docs/docsite/rst/network/user_guide/platform_routeros.rst +++ b/docs/docsite/rst/network/user_guide/platform_routeros.rst @@ -51,7 +51,7 @@ Example CLI ``group_vars/routeros.yml`` ansible_network_os: community.network.routeros ansible_user: myuser ansible_password: !vault... - ansible_become: yes + ansible_become: true ansible_become_method: enable ansible_become_password: !vault... ansible_ssh_common_args: '-o ProxyCommand="ssh -W %h:%p -q bastion01"' diff --git a/docs/docsite/rst/network/user_guide/platform_voss.rst b/docs/docsite/rst/network/user_guide/platform_voss.rst index 172a0530c8..a66e42e65b 100644 --- a/docs/docsite/rst/network/user_guide/platform_voss.rst +++ b/docs/docsite/rst/network/user_guide/platform_voss.rst @@ -29,7 +29,7 @@ Connections available Connection Settings ``ansible_connection: ansible.netcommon.network_cli`` - |enable_mode| supported: use ``ansible_become: yes`` + |enable_mode| supported: use ``ansible_become: true`` with ``ansible_become_method: enable`` Returned Data Format ``stdout[0].`` @@ -51,7 +51,7 @@ Example CLI ``group_vars/voss.yml`` ansible_connection: ansible.netcommon.network_cli ansible_network_os: community.network.voss ansible_user: myuser - ansible_become: yes + ansible_become: true ansible_become_method: enable ansible_password: !vault... ansible_ssh_common_args: '-o ProxyCommand="ssh -W %h:%p -q bastion01"' diff --git a/docs/docsite/rst/playbook_guide/playbooks_privilege_escalation.rst b/docs/docsite/rst/playbook_guide/playbooks_privilege_escalation.rst index 7222ab3396..174533a5b3 100644 --- a/docs/docsite/rst/playbook_guide/playbooks_privilege_escalation.rst +++ b/docs/docsite/rst/playbook_guide/playbooks_privilege_escalation.rst @@ -26,7 +26,7 @@ become set to ``yes`` to activate privilege escalation. become_user - set to user with desired privileges — the user you `become`, NOT the user you login as. Does NOT imply ``become: yes``, to allow it to be set at host level. Default value is ``root``. + set to user with desired privileges — the user you `become`, NOT the user you login as. Does NOT imply ``become: true``, to allow it to be set at host level. Default value is ``root``. become_method (at play or task level) overrides the default method set in ansible.cfg, set to use any of the :ref:`become_plugins`. @@ -79,7 +79,7 @@ ansible_become_method which privilege escalation method should be used ansible_become_user - set the user you become through privilege escalation; does not imply ``ansible_become: yes`` + set the user you become through privilege escalation; does not imply ``ansible_become: true`` ansible_become_password set the privilege escalation password. See :ref:`playbooks_vault` for details on how to avoid having secrets in plain text @@ -300,7 +300,7 @@ As of version 2.6, Ansible supports ``become`` for privilege escalation (enterin You must set the connection type to either ``connection: ansible.netcommon.network_cli`` or ``connection: ansible.netcommon.httpapi`` to use ``become`` for privilege escalation on network devices. Check the :ref:`platform_options` documentation for details. -You can use escalated privileges on only the specific tasks that need them, on an entire play, or on all plays. Adding ``become: yes`` and ``become_method: enable`` instructs Ansible to enter ``enable`` mode before executing the task, play, or playbook where those parameters are set. +You can use escalated privileges on only the specific tasks that need them, on an entire play, or on all plays. Adding ``become: true`` and ``become_method: enable`` instructs Ansible to enter ``enable`` mode before executing the task, play, or playbook where those parameters are set. If you see this error message, the task that generated it requires ``enable`` mode to succeed: |