Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
cloud
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Service Desk
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Ansible
Roles
cloud
Commits
765aaa9b
Commit
765aaa9b
authored
5 years ago
by
jurgenhaas
Browse files
Options
Downloads
Patches
Plain Diff
ansible-playbooks/general#85 Name import and include tasks
parent
519bae26
No related branches found
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
tasks/ec2/inithost.yml
+4
-2
4 additions, 2 deletions
tasks/ec2/inithost.yml
tasks/inithost.yml
+2
-1
2 additions, 1 deletion
tasks/inithost.yml
tasks/main.yml
+4
-2
4 additions, 2 deletions
tasks/main.yml
tasks/removehost.yml
+2
-1
2 additions, 1 deletion
tasks/removehost.yml
with
12 additions
and
6 deletions
tasks/ec2/inithost.yml
+
4
−
2
View file @
765aaa9b
...
...
@@ -39,11 +39,13 @@
state
:
present
with_items
:
'
{{
ec2.instance_ids
}}'
-
import_tasks
:
inithostip.yml hostip='{{ inithostip }}'
-
name
:
Import inithostip
import_tasks
:
inithostip.yml hostip='{{ inithostip }}'
when
:
inithostip is defined
-
include_tasks
:
inithostip.yml hostip='{{ ec2instance.public_ip }}'
-
name
:
Include inithostip
include_tasks
:
inithostip.yml hostip='{{ ec2instance.public_ip }}'
with_items
:
'
{{
ec2.instances
}}'
loop_control
:
loop_var
:
ec2instance
...
...
This diff is collapsed.
Click to expand it.
tasks/inithost.yml
+
2
−
1
View file @
765aaa9b
---
# file: inithost.yml
-
import_tasks
:
"
cleanup.yml"
-
name
:
Import cleanup
import_tasks
:
"
cleanup.yml"
This diff is collapsed.
Click to expand it.
tasks/main.yml
+
4
−
2
View file @
765aaa9b
...
...
@@ -9,8 +9,10 @@
-
block
:
-
import_tasks
:
"
{{
cloud|default('none')
}}/{{
mode
}}.yml"
-
name
:
Import cloud mode
import_tasks
:
'
{{
cloud|default("none")
}}/{{
mode
}}.yml'
-
import_tasks
:
"
{{
mode
}}.yml"
-
name
:
Import mode
import_tasks
:
'
{{
mode
}}.yml'
when
:
not excluded_roles or "cloud" not in excluded_roles
This diff is collapsed.
Click to expand it.
tasks/removehost.yml
+
2
−
1
View file @
765aaa9b
---
# file: removehost.yml
-
import_tasks
:
"
cleanup.yml"
-
name
:
Import cleanup
import_tasks
:
'
cleanup.yml'
when
:
are_you_sure == "YES"
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment