Created
January 17, 2014 19:28
-
-
Save Pablohn26/8479804 to your computer and use it in GitHub Desktop.
This file contains 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
with the next structure: | |
- vmHash: { vcpu: 1, | |
ram: 1024, | |
storage: 10, | |
vms: [{name: storage1-dev02,ip: 10.199.3.87}, | |
{name: storage2-dev02,ip: 10.199.3.88}, | |
{name: storage3-dev02,ip: 10.199.3.89}] | |
} | |
- name: send stuff2 to all ttys | |
shell: "echo 'sed -i '' 's/{{ goldenip }}/{{ item.ip }}/g' /cf/conf/config.xml' > /dev/pts/foo" | |
with_items: vmHash.vms | |
# - ntty.results | |
How to use with_together? I want to change, foo (on /dev/pts/foo) by the content of ntty.results. An approach is | |
- name: send stuff2 to all ttys | |
shell: "echo 'sed -i '' 's/{{ goldenip }}/{{ item.ip.0 }}/g' /cf/conf/config.xml' > /dev/pts/{{ item.1 }}" | |
with_items: | |
- vmHash.vms | |
- ntty.results | |
But it does not work. Thanks :) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment