mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Flip default for AGNOSTIC_BECOME_PROMPT (#45563)
* Flip default for AGNOSTIC_BECOME_PROMPT * simplify AGNOSTIC_BECOME_PROMPT porting guide entry * clarify AGNOSTIC_BECOME_PROMPT changelog entry * fixes version typo * uses alternate wording (rather than escaping *)
This commit is contained in:
parent
d383d87b22
commit
829f48e3f5
3 changed files with 23 additions and 2 deletions
2
changelogs/fragments/agnostic-become-prompt.yaml
Normal file
2
changelogs/fragments/agnostic-become-prompt.yaml
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
minor_changes:
|
||||||
|
- become - Change the default value for `AGNOSTIC_BECOME_PROMPT` to `True` so become prompts display `BECOME password:` regardless of the become method used. To display the become method in the prompt (for example, `SUDO password:`), set this config option to `False`.
|
|
@ -20,6 +20,26 @@ Playbook
|
||||||
No notable changes.
|
No notable changes.
|
||||||
|
|
||||||
|
|
||||||
|
Command Line
|
||||||
|
============
|
||||||
|
|
||||||
|
Become Prompting
|
||||||
|
----------------
|
||||||
|
|
||||||
|
Beginning in version 2.8, by default Ansible will use the word ``BECOME`` to prompt you for a password for elevated privileges (``sudo`` privileges on unix systems or ``enable`` mode on network devices):
|
||||||
|
|
||||||
|
By default in Ansible 2.8::
|
||||||
|
|
||||||
|
ansible-playbook --become --ask-become-pass site.yml
|
||||||
|
BECOME password:
|
||||||
|
|
||||||
|
If you want the prompt to display the specific ``become_method`` you're using, instead of the agnostic value ``BECOME``, set :ref:`AGNOSTIC_BECOME_PROMPT` to ``False`` in your Ansible configuration.
|
||||||
|
|
||||||
|
By default in Ansible 2.7, or with ``AGNOSTIC_BECOME_PROMPT=False`` in Ansible 2.8::
|
||||||
|
|
||||||
|
ansible-playbook --become --ask-become-pass site.yml
|
||||||
|
SUDO password:
|
||||||
|
|
||||||
Deprecated
|
Deprecated
|
||||||
==========
|
==========
|
||||||
|
|
||||||
|
|
|
@ -160,9 +160,8 @@ BECOME_ALLOW_SAME_USER:
|
||||||
type: boolean
|
type: boolean
|
||||||
yaml: {key: privilege_escalation.become_allow_same_user}
|
yaml: {key: privilege_escalation.become_allow_same_user}
|
||||||
AGNOSTIC_BECOME_PROMPT:
|
AGNOSTIC_BECOME_PROMPT:
|
||||||
# TODO: Switch the default to True in either the Ansible 2.6 release or the 2.7 release, whichever happens after the Tower 3.3 release
|
|
||||||
name: Display an agnostic become prompt
|
name: Display an agnostic become prompt
|
||||||
default: False
|
default: True
|
||||||
type: boolean
|
type: boolean
|
||||||
description: Display an agnostic become prompt instead of displaying a prompt containing the command line supplied become method
|
description: Display an agnostic become prompt instead of displaying a prompt containing the command line supplied become method
|
||||||
env: [{name: ANSIBLE_AGNOSTIC_BECOME_PROMPT}]
|
env: [{name: ANSIBLE_AGNOSTIC_BECOME_PROMPT}]
|
||||||
|
|
Loading…
Reference in a new issue