Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
files
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
infra
ansible
roles
files
Commits
7be38f39
Verified
Commit
7be38f39
authored
Jul 11, 2021
by
nd
Browse files
Options
Downloads
Patches
Plain Diff
cleaned up role
parent
b68cccba
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
defaults/main.yml
+10
-0
10 additions, 0 deletions
defaults/main.yml
tasks/file.yml
+6
-27
6 additions, 27 deletions
tasks/file.yml
with
16 additions
and
27 deletions
defaults/main.yml
+
10
−
0
View file @
7be38f39
files
:
{}
files_default
:
group
:
root
owner
:
root
mode
:
"
0700"
state
:
touch
src
:
~
content
:
~
template
:
~
template_vars
:
{}
This diff is collapsed.
Click to expand it.
tasks/file.yml
+
6
−
27
View file @
7be38f39
-
set_fact
:
defaultfile
:
group
:
root
owner
:
root
mode
:
"
0700"
state
:
touch
src
:
~
content
:
~
template
:
~
template_vars
:
{}
file
:
"
{{
{}|combine(files_default,
item.value|d({}),
{'path':
item.key}
)
}}"
-
set_fact
:
file
:
"
{{
defaultfile|combine(item.value|d({}),
{'path':
item.key}
)
}}"
-
name
:
create file/folder
-
name
:
"
create
file/folder
(file
module,
{{
file.path
}})"
when
:
-
not file.content
-
not file.template
-
not file.src
file
:
path
:
"
{{
file.path
}}"
group
:
"
{{
file.group
}}"
...
...
@@ -25,23 +13,14 @@
src
:
"
{{
file.src
}}"
state
:
"
{{
file.state
}}"
-
name
:
create file/folder
-
name
:
"
create
file/folder
(copy
module,
{{
file.path
}})"
when
:
-
file.content
-
not
file.s
rc
-
file.content
or file.src
-
file.s
tate != 'link'
copy
:
dest
:
"
{{
file.path
}}"
group
:
"
{{
file.group
}}"
owner
:
"
{{
file.owner
}}"
mode
:
"
{{
file.mode
}}"
content
:
"
{{
file.content
}}"
-
name
:
create file/folder
when
:
-
file.src
copy
:
dest
:
"
{{
file.path
}}"
group
:
"
{{
file.group
}}"
owner
:
"
{{
file.owner
}}"
mode
:
"
{{
file.mode
}}"
src
:
"
{{
file.src
}}"
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