Created
August 15, 2014 17:16
-
-
Save major/db1ecc28a5644169cc69 to your computer and use it in GitHub Desktop.
Ansible: create directory w/relative path
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] ************************************************************** | |
| GATHERING FACTS *************************************************************** | |
| <localhost> REMOTE_MODULE setup | |
| <localhost> EXEC ['/bin/sh', '-c', 'mkdir -p $HOME/.ansible/tmp/ansible-tmp-1408122888.66-13421194942965 && echo $HOME/.ansible/tmp/ansible-tmp-1408122888.66-13421194942965'] | |
| <localhost> PUT /tmp/tmp5Qho7b TO /root/.ansible/tmp/ansible-tmp-1408122888.66-13421194942965/setup | |
| <localhost> EXEC ['/bin/sh', '-c', u'LANG=en_US.UTF-8 LC_CTYPE=en_US.UTF-8 /usr/bin/python /root/.ansible/tmp/ansible-tmp-1408122888.66-13421194942965/setup; rm -rf /root/.ansible/tmp/ansible-tmp-1408122888.66-13421194942965/ >/dev/null 2>&1'] | |
| ok: [localhost] | |
| TASK: [file path=test_dir state=directory] ************************************ | |
| <localhost> REMOTE_MODULE file path=test_dir state=directory | |
| <localhost> EXEC ['/bin/sh', '-c', 'mkdir -p $HOME/.ansible/tmp/ansible-tmp-1408122888.84-149829517711453 && echo $HOME/.ansible/tmp/ansible-tmp-1408122888.84-149829517711453'] | |
| <localhost> PUT /tmp/tmpQ2jsXO TO /root/.ansible/tmp/ansible-tmp-1408122888.84-149829517711453/file | |
| <localhost> EXEC ['/bin/sh', '-c', u'LANG=en_US.UTF-8 LC_CTYPE=en_US.UTF-8 /usr/bin/python /root/.ansible/tmp/ansible-tmp-1408122888.84-149829517711453/file; rm -rf /root/.ansible/tmp/ansible-tmp-1408122888.84-149829517711453/ >/dev/null 2>&1'] | |
| failed: [localhost] => {"failed": true, "path": "test_dir", "state": "absent"} | |
| msg: path test_dir does not exist | |
| FATAL: all hosts have already failed -- aborting |
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 | |
| tasks: | |
| - file: path=test_dir state=directory |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment