diff options
author | Brian Coca <brian.coca+git@gmail.com> | 2015-12-28 12:25:27 -0500 |
---|---|---|
committer | Brian Coca <brian.coca+git@gmail.com> | 2015-12-28 12:50:04 -0500 |
commit | a703f3a6d2e4df9c74a1f1b3504ad8dc92acd0dd (patch) | |
tree | b3dfd13e76989b315e6c659abd80d249093ae5d7 | |
parent | f7ea8b32a9576b3b17a7b43aeb542c4f832940ac (diff) | |
download | ansible-a703f3a6d2e4df9c74a1f1b3504ad8dc92acd0dd.tar.gz |
added newer vars to 'reset_vars'
these vars pass back info to the task about the connection
moved to their own block at start at file for readability and
added the newer standard vars
-rw-r--r-- | lib/ansible/playbook/play_context.py | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/lib/ansible/playbook/play_context.py b/lib/ansible/playbook/play_context.py index bb3f5aa7a7..89beeaddbc 100644 --- a/lib/ansible/playbook/play_context.py +++ b/lib/ansible/playbook/play_context.py @@ -125,6 +125,18 @@ TASK_ATTRIBUTE_OVERRIDES = ( 'remote_user', ) +RESET_VARS = ( + 'ansible_connection', + 'ansible_ssh_host', + 'ansible_ssh_pass', + 'ansible_ssh_port', + 'ansible_ssh_user', + 'ansible_ssh_private_key_file', + 'ansible_ssh_pipelining', + 'ansible_user', + 'ansible_host', + 'ansible_port', +) class PlayContext(Base): @@ -505,7 +517,8 @@ class PlayContext(Base): # TODO: should we be setting the more generic values here rather than # the more specific _ssh_ ones? - for special_var in ['ansible_connection', 'ansible_ssh_host', 'ansible_ssh_pass', 'ansible_ssh_port', 'ansible_ssh_user', 'ansible_ssh_private_key_file', 'ansible_ssh_pipelining']: + for special_var in RESET_VARS: + if special_var not in variables: for prop, varnames in MAGIC_VARIABLE_MAPPING.items(): if special_var in varnames: |