Skip to content
Snippets Groups Projects
Commit 5261ec8e authored by jurgenhaas's avatar jurgenhaas
Browse files

ansible-playbooks/general#72 Always use import_tasks or include_tasks instead of just include

parent 795c7723
No related branches found
No related tags found
No related merge requests found
......@@ -36,8 +36,7 @@
state: present
with_items: '{{ ec2.instance_ids }}'
- include_tasks: inithostip.yml hostip='{{ inithostip }}'
tags: 'always'
- import_tasks: inithostip.yml hostip='{{ inithostip }}'
when: inithostip is defined
......@@ -46,4 +45,3 @@
loop_control:
loop_var: ec2instance
when: inithostip is not defined
tags: 'always'
---
# file: inithost.yml
- include_tasks: "cleanup.yml"
tags: 'always'
- import_tasks: "cleanup.yml"
......@@ -7,8 +7,8 @@
- block:
- include: "{{ cloud|default('none') }}/{{ mode }}.yml"
- import_tasks: "{{ cloud|default('none') }}/{{ mode }}.yml"
- include: "{{ mode }}.yml"
- import_tasks: "{{ mode }}.yml"
when: '"cloud" not in excluded_roles'
---
# file: removehost.yml
- include_tasks: "cleanup.yml"
- import_tasks: "cleanup.yml"
when: are_you_sure == "YES"
tags: 'always'
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment