Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save masahide/7787778 to your computer and use it in GitHub Desktop.
Save masahide/7787778 to your computer and use it in GitHub Desktop.
ansible-playbook ワンライナー ref: http://qiita.com/yamasaki-masahide/items/fa96225815869daa9e53
$ diff -u <(ssh host1 cat /etc/hosts) <(ssh host2 cat /etc/hsots)
$ ansible-playbook -i <(curl -s https://raw.github.com/masahide/playbook-sample/master/localhost) <(curl -s https://raw.github.com/masahide/playbook-sample/master/sample.yml) -e dir=`pwd`
$ ansible-playbook -i <(curl -s https://raw.github.com/masahide/playbook-sample/master/localhost) <(curl -s https://raw.github.com/masahide/playbook-sample/master/sample.yml) -e dir=`pwd`
PLAY [localhost] **************************************************************
TASK: [create directories for ansible files.] *********************************
changed: [localhost] => (item=/home/masahide/work/playbook/group_vars)
changed: [localhost] => (item=/home/masahide/work/playbook/host_vars)
changed: [localhost] => (item=/home/masahide/work/playbook/roles/common/tasks)
changed: [localhost] => (item=/home/masahide/work/playbook/roles/common/defaults)
changed: [localhost] => (item=/home/masahide/work/playbook/roles/common/handlers)
changed: [localhost] => (item=/home/masahide/work/playbook/roles/common/templates)
changed: [localhost] => (item=/home/masahide/work/playbook/roles/common/files)
changed: [localhost] => (item=/home/masahide/work/playbook/roles/common/vars)
PLAY RECAP ********************************************************************
localhost : ok=1 changed=1 unreachable=0 failed=0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment