Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
commonconnect
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
commonconnect
Commits
7b21ed31
Commit
7b21ed31
authored
5 years ago
by
jurgenhaas
Browse files
Options
Downloads
Patches
Plain Diff
ansible-playbooks/general#85 Linting
parent
ac762682
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
tasks/main.yml
+6
-4
6 additions, 4 deletions
tasks/main.yml
tasks/more.yml
+3
-1
3 additions, 1 deletion
tasks/more.yml
with
9 additions
and
5 deletions
tasks/main.yml
+
6
−
4
View file @
7b21ed31
...
...
@@ -2,7 +2,8 @@
# file: roles/commonconnect/tasks/main.yml
-
name
:
"
Common
Connect
Role"
set_fact
:
role_commonconnect_started=true
set_fact
:
role_commonconnect_started
:
true
tags
:
'
always'
-
block
:
...
...
@@ -29,7 +30,7 @@
-
block
:
-
name
:
"
Read
available
variable
cache
files"
shell
:
ls ~/.ansible/hostvars
shell
:
'
ls
~/.ansible/hostvars
'
become
:
no
register
:
variable_files
failed_when
:
false
...
...
@@ -37,7 +38,7 @@
ignore_errors
:
true
tags
:
'
always'
-
include_tasks
:
more.yml
-
include_tasks
:
'
more.yml
'
with_items
:
'
{{
variable_files.stdout_lines|default([])
}}'
loop_control
:
loop_var
:
inventory_name
...
...
@@ -45,7 +46,8 @@
when
:
lookup('pipe','hostname') == inventory_hostname
-
name
:
'
Remember
that
this
role
had
been
run'
set_fact
:
role_commonconnect_completed=true
set_fact
:
role_commonconnect_completed
:
true
tags
:
'
always'
when
:
'
"commonconnect"
not
in
excluded_roles
and
role_commonconnect_completed
is
not
defined'
This diff is collapsed.
Click to expand it.
tasks/more.yml
+
3
−
1
View file @
7b21ed31
---
# file: roles/commonconnect/tasks/more.yml
-
set_fact
:
facts="{{ lookup('file','~/.ansible/hostvars/{{ inventory_name }}') | from_json }}"
-
name
:
"
Set
facts"
set_fact
:
facts
:
"
{{
lookup('file','~/.ansible/hostvars/{{
inventory_name
}}')
|
from_json
}}"
-
name
:
"
Add
Hosts
to
Hostfile"
lineinfile
:
...
...
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