Created
April 24, 2017 17:15
-
-
Save joejulian/2ed72873399cfd1cdb9177f5c24b0659 to your computer and use it in GitHub Desktop.
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
--- | |
- name: foo | |
hosts: localhost | |
vars: | |
bar: | |
c: | |
b: | |
a: 1 | |
tasks: | |
- name: bite me | |
set_fact: | |
deployment: | |
clusters: | |
- name: foo | |
value: 4 | |
- name: bar | |
value: 6 | |
- name: baz | |
value: 8 | |
- name: make a list of clusters with the additional fact | |
set_fact: | |
temp: "{{ temp + [ item | combine(fubar, recursive=true) ] }}" | |
vars: | |
temp: [] | |
fubar: | |
not_random_prefix: "12345" | |
with_items: "{{ deployment.clusters }}" | |
- name: Wassssuuuuuppppp | |
debug: | |
var: temp | |
- name: replace the old clusters list with the new one | |
set_fact: | |
deployment: "{{ deployment | combine(dict, recursive=true) }}" | |
vars: | |
dict: | |
clusters: "{{ temp }}" | |
- name: Wassssuuuuuppppp | |
debug: | |
var: deployment |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment