mirror of https://github.com/ansible/ansible.git
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
50 lines
1.4 KiB
YAML
50 lines
1.4 KiB
YAML
9 years ago
|
- name: setup state
|
||
6 years ago
|
hosts: localhost
|
||
9 years ago
|
gather_facts: false
|
||
|
tasks:
|
||
9 years ago
|
- file: path={{playbook_dir}}/files state=directory
|
||
9 years ago
|
- file: path={{playbook_dir}}/roles/showfile/files state=directory
|
||
9 years ago
|
- copy: dest={{playbook_dir}}/roles/showfile/files/testfile content='in role files'
|
||
|
- copy: dest={{playbook_dir}}/roles/showfile/testfile content='in role'
|
||
8 years ago
|
- copy: dest={{playbook_dir}}/roles/showfile/tasks/testfile content='in role tasks'
|
||
9 years ago
|
- copy: dest={{playbook_dir}}/files/testfile content='in files'
|
||
|
- copy: dest={{playbook_dir}}/testfile content='in local'
|
||
|
|
||
|
- include: testplay.yml
|
||
8 years ago
|
vars:
|
||
|
remove: nothing
|
||
|
role_out: in role files
|
||
|
play_out: in files
|
||
9 years ago
|
|
||
|
- include: testplay.yml
|
||
8 years ago
|
vars:
|
||
|
remove: roles/showfile/files/testfile
|
||
|
role_out: in role
|
||
|
play_out: in files
|
||
9 years ago
|
|
||
|
- include: testplay.yml
|
||
8 years ago
|
vars:
|
||
|
remove: roles/showfile/testfile
|
||
|
role_out: in role tasks
|
||
|
play_out: in files
|
||
9 years ago
|
|
||
|
- include: testplay.yml
|
||
8 years ago
|
vars:
|
||
|
remove: roles/showfile/tasks/testfile
|
||
|
role_out: in files
|
||
|
play_out: in files
|
||
9 years ago
|
|
||
|
- include: testplay.yml
|
||
8 years ago
|
vars:
|
||
|
remove: files/testfile
|
||
|
role_out: in local
|
||
|
play_out: in local
|
||
9 years ago
|
|
||
|
- name: cleanup
|
||
6 years ago
|
hosts: localhost
|
||
9 years ago
|
gather_facts: false
|
||
|
tasks:
|
||
|
- file: path={{playbook_dir}}/testfile state=absent
|
||
9 years ago
|
- file: path={{playbook_dir}}/files state=absent
|
||
9 years ago
|
- file: path={{playbook_dir}}/roles/showfile/files state=absent
|