Created
December 2, 2014 17:11
-
-
Save lukeorland/1feaef1be7640ad8fa65 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
--- | |
- hosts: 127.0.0.1 | |
connection: local | |
tasks: | |
- name: Remove file 0 | |
file: name=/tmp/mycoolfile state=absent | |
- name: Touch file with async, dictionary syntax | |
command: touch mycoolfile | |
args: | |
chdir: /tmp | |
- name: File should exist 1 | |
file: name=/tmp/mycoolfile state=absent | |
register: remove_file | |
failed_when: not remove_file.changed | |
- name: "Touch file with async, = syntax" | |
command: touch mycoolfile chdir=/tmp | |
async: 3600 | |
poll: 5 | |
- name: File should exist 2 | |
file: name=/tmp/mycoolfile state=absent | |
register: remove_file | |
failed_when: not remove_file.changed | |
- name: Touch file with async, dictionary syntax | |
command: touch mycoolfile | |
args: | |
chdir: /tmp | |
async: 3600 | |
poll: 5 | |
- name: File should exist 3 | |
file: name=/tmp/mycoolfile state=absent | |
register: remove_file | |
failed_when: not remove_file.changed |
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
localhost |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Execute:
The task
Touch file with async, dictionary syntax
tries to touch a file in/
instead of in/tmp
.