removed previouslly deprecated settings (#55662)
* removed previouslly deprecated settings fixes #55304 * also removed from play context
This commit is contained in:
parent
4bf134756b
commit
183ba93ba3
5 changed files with 2 additions and 116 deletions
2
changelogs/fragments/removed_obsolete_configs.yml
Normal file
2
changelogs/fragments/removed_obsolete_configs.yml
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
minor_changes:
|
||||||
|
- All previouslly deprecated sudo/su and module locale global settings have been removed.
|
|
@ -418,32 +418,6 @@ DEFAULT_ASK_PASS:
|
||||||
- {key: ask_pass, section: defaults}
|
- {key: ask_pass, section: defaults}
|
||||||
type: boolean
|
type: boolean
|
||||||
yaml: {key: defaults.ask_pass}
|
yaml: {key: defaults.ask_pass}
|
||||||
DEFAULT_ASK_SUDO_PASS:
|
|
||||||
name: Ask for the sudo password
|
|
||||||
default: False
|
|
||||||
deprecated:
|
|
||||||
why: In favor of Ansible Become, which is a generic framework. See become_ask_pass.
|
|
||||||
version: "2.9"
|
|
||||||
alternatives: become
|
|
||||||
description:
|
|
||||||
- This controls whether an Ansible playbook should prompt for a sudo password.
|
|
||||||
env: [{name: ANSIBLE_ASK_SUDO_PASS}]
|
|
||||||
ini:
|
|
||||||
- {key: ask_sudo_pass, section: defaults}
|
|
||||||
type: boolean
|
|
||||||
DEFAULT_ASK_SU_PASS:
|
|
||||||
name: Ask for the su password
|
|
||||||
default: False
|
|
||||||
deprecated:
|
|
||||||
why: In favor of Ansible Become, which is a generic framework. See become_ask_pass.
|
|
||||||
version: "2.9"
|
|
||||||
alternatives: become
|
|
||||||
description:
|
|
||||||
- This controls whether an Ansible playbook should prompt for a su password.
|
|
||||||
env: [{name: ANSIBLE_ASK_SU_PASS}]
|
|
||||||
ini:
|
|
||||||
- {key: ask_su_pass, section: defaults}
|
|
||||||
type: boolean
|
|
||||||
DEFAULT_ASK_VAULT_PASS:
|
DEFAULT_ASK_VAULT_PASS:
|
||||||
name: Ask for the vault password(s)
|
name: Ask for the vault password(s)
|
||||||
default: False
|
default: False
|
||||||
|
@ -851,19 +825,6 @@ DEFAULT_MODULE_COMPRESSION:
|
||||||
- {key: module_compression, section: defaults}
|
- {key: module_compression, section: defaults}
|
||||||
# vars:
|
# vars:
|
||||||
# - name: ansible_module_compression
|
# - name: ansible_module_compression
|
||||||
DEFAULT_MODULE_LANG:
|
|
||||||
name: Target language environment
|
|
||||||
default: "{{ CONTROLLER_LANG }}"
|
|
||||||
description:
|
|
||||||
- "Language locale setting to use for modules when they execute on the target."
|
|
||||||
- "If empty it tries to set itself to the LANG environment variable on the controller."
|
|
||||||
- "This is only used if DEFAULT_MODULE_SET_LOCALE is set to true"
|
|
||||||
env: [{name: ANSIBLE_MODULE_LANG}]
|
|
||||||
ini:
|
|
||||||
- {key: module_lang, section: defaults}
|
|
||||||
deprecated:
|
|
||||||
why: Modules are coded to set their own locale if needed for screenscraping
|
|
||||||
version: "2.9"
|
|
||||||
DEFAULT_MODULE_NAME:
|
DEFAULT_MODULE_NAME:
|
||||||
name: Default adhoc module
|
name: Default adhoc module
|
||||||
default: command
|
default: command
|
||||||
|
@ -879,18 +840,6 @@ DEFAULT_MODULE_PATH:
|
||||||
ini:
|
ini:
|
||||||
- {key: library, section: defaults}
|
- {key: library, section: defaults}
|
||||||
type: pathspec
|
type: pathspec
|
||||||
DEFAULT_MODULE_SET_LOCALE:
|
|
||||||
name: Target locale
|
|
||||||
default: False
|
|
||||||
description:
|
|
||||||
- Controls if we set locale for modules when executing on the target.
|
|
||||||
env: [{name: ANSIBLE_MODULE_SET_LOCALE}]
|
|
||||||
ini:
|
|
||||||
- {key: module_set_locale, section: defaults}
|
|
||||||
type: boolean
|
|
||||||
deprecated:
|
|
||||||
why: Modules are coded to set their own locale if needed for screenscraping
|
|
||||||
version: "2.9"
|
|
||||||
DEFAULT_MODULE_UTILS_PATH:
|
DEFAULT_MODULE_UTILS_PATH:
|
||||||
name: Module Utils Path
|
name: Module Utils Path
|
||||||
description: Colon separated paths in which Ansible will search for Module utils files, which are shared by modules.
|
description: Colon separated paths in which Ansible will search for Module utils files, which are shared by modules.
|
||||||
|
@ -1108,39 +1057,6 @@ DEFAULT_SU:
|
||||||
- {key: su, section: defaults}
|
- {key: su, section: defaults}
|
||||||
type: boolean
|
type: boolean
|
||||||
yaml: {key: defaults.su}
|
yaml: {key: defaults.su}
|
||||||
DEFAULT_SU_EXE:
|
|
||||||
name: su executable
|
|
||||||
default: su
|
|
||||||
deprecated:
|
|
||||||
why: In favor of Ansible Become, which is a generic framework. See become_exe.
|
|
||||||
version: "2.9"
|
|
||||||
alternatives: become
|
|
||||||
description: 'specify an "su" executable, otherwise it relies on PATH.'
|
|
||||||
env: [{name: ANSIBLE_SU_EXE}]
|
|
||||||
ini:
|
|
||||||
- {key: su_exe, section: defaults}
|
|
||||||
DEFAULT_SU_FLAGS:
|
|
||||||
name: su flags
|
|
||||||
default: ''
|
|
||||||
deprecated:
|
|
||||||
why: In favor of Ansible Become, which is a generic framework. See become_flags.
|
|
||||||
version: "2.9"
|
|
||||||
alternatives: become
|
|
||||||
description: 'Flags to pass to su'
|
|
||||||
env: [{name: ANSIBLE_SU_FLAGS}]
|
|
||||||
ini:
|
|
||||||
- {key: su_flags, section: defaults}
|
|
||||||
DEFAULT_SU_USER:
|
|
||||||
name: su user
|
|
||||||
default:
|
|
||||||
description: 'User you become when using "su", leaving it blank will use the default configured on the target (normally root)'
|
|
||||||
env: [{name: ANSIBLE_SU_USER}]
|
|
||||||
ini:
|
|
||||||
- {key: su_user, section: defaults}
|
|
||||||
deprecated:
|
|
||||||
why: In favor of Ansible Become, which is a generic framework. See become_user.
|
|
||||||
version: "2.9"
|
|
||||||
alternatives: become
|
|
||||||
DEFAULT_SYSLOG_FACILITY:
|
DEFAULT_SYSLOG_FACILITY:
|
||||||
name: syslog facility
|
name: syslog facility
|
||||||
default: LOG_USER
|
default: LOG_USER
|
||||||
|
|
|
@ -97,13 +97,10 @@ BECOME_METHODS = _DeprecatedSequenceConstant(
|
||||||
# CONSTANTS ### yes, actual ones
|
# CONSTANTS ### yes, actual ones
|
||||||
BLACKLIST_EXTS = ('.pyc', '.pyo', '.swp', '.bak', '~', '.rpm', '.md', '.txt', '.rst')
|
BLACKLIST_EXTS = ('.pyc', '.pyo', '.swp', '.bak', '~', '.rpm', '.md', '.txt', '.rst')
|
||||||
BOOL_TRUE = BOOLEANS_TRUE
|
BOOL_TRUE = BOOLEANS_TRUE
|
||||||
CONTROLLER_LANG = os.getenv('LANG', 'en_US.UTF-8')
|
|
||||||
DEFAULT_BECOME_PASS = None
|
DEFAULT_BECOME_PASS = None
|
||||||
DEFAULT_PASSWORD_CHARS = to_text(ascii_letters + digits + ".,:-_", errors='strict') # characters included in auto-generated passwords
|
DEFAULT_PASSWORD_CHARS = to_text(ascii_letters + digits + ".,:-_", errors='strict') # characters included in auto-generated passwords
|
||||||
DEFAULT_SUDO_PASS = None
|
|
||||||
DEFAULT_REMOTE_PASS = None
|
DEFAULT_REMOTE_PASS = None
|
||||||
DEFAULT_SUBSET = None
|
DEFAULT_SUBSET = None
|
||||||
DEFAULT_SU_PASS = None
|
|
||||||
# FIXME: expand to other plugins, but never doc fragments
|
# FIXME: expand to other plugins, but never doc fragments
|
||||||
CONFIGURABLE_PLUGINS = ('become', 'cache', 'callback', 'cliconf', 'connection', 'httpapi', 'inventory', 'lookup', 'shell')
|
CONFIGURABLE_PLUGINS = ('become', 'cache', 'callback', 'cliconf', 'connection', 'httpapi', 'inventory', 'lookup', 'shell')
|
||||||
# NOTE: always update the docs/docsite/Makefile to match
|
# NOTE: always update the docs/docsite/Makefile to match
|
||||||
|
@ -171,18 +168,6 @@ MAGIC_VARIABLE_MAPPING = dict(
|
||||||
become_pass=('ansible_become_password', 'ansible_become_pass'),
|
become_pass=('ansible_become_password', 'ansible_become_pass'),
|
||||||
become_exe=('ansible_become_exe', ),
|
become_exe=('ansible_become_exe', ),
|
||||||
become_flags=('ansible_become_flags', ),
|
become_flags=('ansible_become_flags', ),
|
||||||
|
|
||||||
# deprecated
|
|
||||||
sudo=('ansible_sudo', ),
|
|
||||||
sudo_user=('ansible_sudo_user', ),
|
|
||||||
sudo_pass=('ansible_sudo_password', 'ansible_sudo_pass'),
|
|
||||||
sudo_exe=('ansible_sudo_exe', ),
|
|
||||||
sudo_flags=('ansible_sudo_flags', ),
|
|
||||||
su=('ansible_su', ),
|
|
||||||
su_user=('ansible_su_user', ),
|
|
||||||
su_pass=('ansible_su_password', 'ansible_su_pass'),
|
|
||||||
su_exe=('ansible_su_exe', ),
|
|
||||||
su_flags=('ansible_su_flags', ),
|
|
||||||
)
|
)
|
||||||
|
|
||||||
# POPULATE SETTINGS FROM CONFIG ###
|
# POPULATE SETTINGS FROM CONFIG ###
|
||||||
|
|
|
@ -292,17 +292,6 @@ class PlayContext(Base):
|
||||||
for become_pass_name in C.MAGIC_VARIABLE_MAPPING.get('become_pass'):
|
for become_pass_name in C.MAGIC_VARIABLE_MAPPING.get('become_pass'):
|
||||||
if become_pass_name in variables:
|
if become_pass_name in variables:
|
||||||
break
|
break
|
||||||
else: # This is a for-else
|
|
||||||
if new_info.become_method == 'sudo':
|
|
||||||
for sudo_pass_name in C.MAGIC_VARIABLE_MAPPING.get('sudo_pass'):
|
|
||||||
if sudo_pass_name in variables:
|
|
||||||
setattr(new_info, 'become_pass', variables[sudo_pass_name])
|
|
||||||
break
|
|
||||||
elif new_info.become_method == 'su':
|
|
||||||
for su_pass_name in C.MAGIC_VARIABLE_MAPPING.get('su_pass'):
|
|
||||||
if su_pass_name in variables:
|
|
||||||
setattr(new_info, 'become_pass', variables[su_pass_name])
|
|
||||||
break
|
|
||||||
|
|
||||||
# make sure we get port defaults if needed
|
# make sure we get port defaults if needed
|
||||||
if new_info.port is None and C.DEFAULT_REMOTE_PORT is not None:
|
if new_info.port is None and C.DEFAULT_REMOTE_PORT is not None:
|
||||||
|
|
|
@ -39,12 +39,6 @@ class ShellBase(AnsiblePlugin):
|
||||||
super(ShellBase, self).__init__()
|
super(ShellBase, self).__init__()
|
||||||
|
|
||||||
self.env = {}
|
self.env = {}
|
||||||
if C.DEFAULT_MODULE_SET_LOCALE:
|
|
||||||
module_locale = C.DEFAULT_MODULE_LANG
|
|
||||||
self.env = {'LANG': module_locale,
|
|
||||||
'LC_ALL': module_locale,
|
|
||||||
'LC_MESSAGES': module_locale}
|
|
||||||
|
|
||||||
self.tmpdir = None
|
self.tmpdir = None
|
||||||
self.executable = None
|
self.executable = None
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue