Created
December 14, 2018 14:35
-
-
Save odyssey4me/72920ef07b68a8d98d45153b95235feb to your computer and use it in GitHub Desktop.
ansible update vs combine
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PLAY [localhost] ************************************************************************************************************************************************************ | |
TASK [debug] **************************************************************************************************************************************************************** | |
ok: [localhost] => { | |
"msg": "" | |
} | |
TASK [debug] **************************************************************************************************************************************************************** | |
ok: [localhost] => { | |
"msg": { | |
"Service": { | |
"Environment": "foo" | |
} | |
} | |
} | |
PLAY RECAP ****************************************************************************************************************************************************************** | |
localhost : ok=2 changed=0 unreachable=0 failed=0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- hosts: localhost | |
connection: local | |
gather_facts: no | |
vars: | |
test1: | |
enabled: yes | |
state: started | |
config_overrides: override1.update(override2) | |
override1: | |
Service: | |
Environment: "foo" | |
override2: {} | |
tasks: | |
- debug: | |
msg: "{{ override1.update(override2) }}" | |
- debug: | |
msg: "{{ override1 | combine(override2) }}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment