mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Make command warnings off by default to minimize surprises.
This commit is contained in:
parent
b44e22aa68
commit
a419ffdf41
5 changed files with 9 additions and 9 deletions
|
@ -13,7 +13,7 @@ New core features:
|
||||||
* 'ansible vault view filename.yml' opens filename.yml decrypted in a pager.
|
* 'ansible vault view filename.yml' opens filename.yml decrypted in a pager.
|
||||||
* no_log parameter now surpressess data from callbacks/output as well as syslog
|
* no_log parameter now surpressess data from callbacks/output as well as syslog
|
||||||
* ansible-galaxy install -f requirements.yml allows advanced options and installs from non-galaxy SCM sources and tarballs.
|
* ansible-galaxy install -f requirements.yml allows advanced options and installs from non-galaxy SCM sources and tarballs.
|
||||||
* command_warnings feature will warn about when usage of the shell/command module can be simplified to use core modules - this can be disabled in ansible.cfg
|
* command_warnings feature will warn about when usage of the shell/command module can be simplified to use core modules - this can be enabled in ansible.cfg
|
||||||
|
|
||||||
New Modules:
|
New Modules:
|
||||||
|
|
||||||
|
|
|
@ -102,12 +102,13 @@ ansible_managed = Ansible managed: {file} modified on %Y-%m-%d %H:%M:%S by {uid}
|
||||||
# to disable these warnings, set the following value to False:
|
# to disable these warnings, set the following value to False:
|
||||||
#deprecation_warnings = True
|
#deprecation_warnings = True
|
||||||
|
|
||||||
# by default (as of 1.8), Ansible will warn when usage of the shell and
|
# (as of 1.8), Ansible can optionally warn when usage of the shell and
|
||||||
# command module appear to be simplified by using a default Ansible module
|
# command module appear to be simplified by using a default Ansible module
|
||||||
# instead. These warnings can be silenced by adjusting the following
|
# instead. These warnings can be silenced by adjusting the following
|
||||||
# setting or adding warn=yes or warn=no to the end of the command line
|
# setting or adding warn=yes or warn=no to the end of the command line
|
||||||
# parameter string.
|
# parameter string. This will for example suggest using the git module
|
||||||
# command_warnings = True
|
# instead of shelling out to the git command.
|
||||||
|
# command_warnings = False
|
||||||
|
|
||||||
|
|
||||||
# set plugin path directories here, separate with colons
|
# set plugin path directories here, separate with colons
|
||||||
|
|
|
@ -170,7 +170,7 @@ HOST_KEY_CHECKING = get_config(p, DEFAULTS, 'host_key_checking', '
|
||||||
SYSTEM_WARNINGS = get_config(p, DEFAULTS, 'system_warnings', 'ANSIBLE_SYSTEM_WARNINGS', True, boolean=True)
|
SYSTEM_WARNINGS = get_config(p, DEFAULTS, 'system_warnings', 'ANSIBLE_SYSTEM_WARNINGS', True, boolean=True)
|
||||||
DEPRECATION_WARNINGS = get_config(p, DEFAULTS, 'deprecation_warnings', 'ANSIBLE_DEPRECATION_WARNINGS', True, boolean=True)
|
DEPRECATION_WARNINGS = get_config(p, DEFAULTS, 'deprecation_warnings', 'ANSIBLE_DEPRECATION_WARNINGS', True, boolean=True)
|
||||||
DEFAULT_CALLABLE_WHITELIST = get_config(p, DEFAULTS, 'callable_whitelist', 'ANSIBLE_CALLABLE_WHITELIST', [], islist=True)
|
DEFAULT_CALLABLE_WHITELIST = get_config(p, DEFAULTS, 'callable_whitelist', 'ANSIBLE_CALLABLE_WHITELIST', [], islist=True)
|
||||||
COMMAND_WARNINGS = get_config(p, DEFAULTS, 'command_warnings', 'ANSIBLE_COMMAND_WARNINGS', True, boolean=True)
|
COMMAND_WARNINGS = get_config(p, DEFAULTS, 'command_warnings', 'ANSIBLE_COMMAND_WARNINGS', False, boolean=True)
|
||||||
|
|
||||||
# CONNECTION RELATED
|
# CONNECTION RELATED
|
||||||
ANSIBLE_SSH_ARGS = get_config(p, 'ssh_connection', 'ssh_args', 'ANSIBLE_SSH_ARGS', None)
|
ANSIBLE_SSH_ARGS = get_config(p, 'ssh_connection', 'ssh_args', 'ANSIBLE_SSH_ARGS', None)
|
||||||
|
|
|
@ -71,10 +71,9 @@ options:
|
||||||
version_added: "1.8"
|
version_added: "1.8"
|
||||||
default: yes
|
default: yes
|
||||||
description:
|
description:
|
||||||
- "turn off warnings about running a command that is provided by an Ansible module, suggesting you should use that module instead. 'Command warnings' can also be turned off globally in ansible.cfg"
|
- if command warnings are on in ansible.cfg, do not warn about this particular line if set to no/false.
|
||||||
required: false
|
required: false
|
||||||
default: True
|
default: True
|
||||||
version_added: "1.5"
|
|
||||||
notes:
|
notes:
|
||||||
- If you want to run a command through the shell (say you are using C(<),
|
- If you want to run a command through the shell (say you are using C(<),
|
||||||
C(>), C(|), etc), you actually want the M(shell) module instead. The
|
C(>), C(|), etc), you actually want the M(shell) module instead. The
|
||||||
|
|
|
@ -43,10 +43,10 @@ options:
|
||||||
version_added: "0.9"
|
version_added: "0.9"
|
||||||
warn:
|
warn:
|
||||||
description:
|
description:
|
||||||
- turn off warnings about running a command that is provided by an Ansible module.
|
- if command warnings are on in ansible.cfg, do not warn about this particular line if set to no/false.
|
||||||
required: false
|
required: false
|
||||||
default: True
|
default: True
|
||||||
version_added: "1.5"
|
version_added: "1.8"
|
||||||
notes:
|
notes:
|
||||||
- If you want to execute a command securely and predictably, it may be
|
- If you want to execute a command securely and predictably, it may be
|
||||||
better to use the M(command) module instead. Best practices when writing
|
better to use the M(command) module instead. Best practices when writing
|
||||||
|
|
Loading…
Reference in a new issue