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
4d3cef28
Verified
Commit
4d3cef28
authored
4 years ago
by
nd
Browse files
Options
Downloads
Plain Diff
Merge branch 'master' of
ssh://git-ssh.notandy.de:2222/ansible/roles/files_
parents
0d76b49a
fecf438e
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
README.md
+4
-1
4 additions, 1 deletion
README.md
tasks/file.yml
+3
-0
3 additions, 0 deletions
tasks/file.yml
with
7 additions
and
1 deletion
README.md
+
4
−
1
View file @
4d3cef28
...
@@ -15,9 +15,12 @@ group: root
...
@@ -15,9 +15,12 @@ group: root
# permission bits, can be octal number or the string representation
# permission bits, can be octal number or the string representation
mode: 0700
mode: 0700
# can be 'present', 'absent', 'directory', or 'touch' (ensure file is created and set modification time to now, but do not change the content)
# can be 'present', 'absent', 'directory', or 'touch' (ensure file is created and set modification time to now, but do not change the content)
, 'link'
state: present
state: present
# target if state is 'link'
src: ''
# set the file content, mutaly exclusive with "template". Only handeled if the state if 'file'
# set the file content, mutaly exclusive with "template". Only handeled if the state if 'file'
content: ''
content: ''
...
...
This diff is collapsed.
Click to expand it.
tasks/file.yml
+
3
−
0
View file @
4d3cef28
...
@@ -4,6 +4,7 @@
...
@@ -4,6 +4,7 @@
owner
:
root
owner
:
root
mode
:
"
0700"
mode
:
"
0700"
state
:
touch
state
:
touch
src
:
~
content
:
~
content
:
~
template
:
~
template
:
~
template_vars
:
{}
template_vars
:
{}
...
@@ -22,11 +23,13 @@
...
@@ -22,11 +23,13 @@
group
:
"
{{
file.group
}}"
group
:
"
{{
file.group
}}"
owner
:
"
{{
file.owner
}}"
owner
:
"
{{
file.owner
}}"
mode
:
"
{{
file.mode
}}"
mode
:
"
{{
file.mode
}}"
src
:
"
{{
file.src
}}"
state
:
"
{{
file.state
}}"
state
:
"
{{
file.state
}}"
-
name
:
create file/folder (copy content)
-
name
:
create file/folder (copy content)
when
:
when
:
-
file.content
-
file.content
-
not file.src
copy
:
copy
:
dest
:
"
{{
file.path
}}"
dest
:
"
{{
file.path
}}"
group
:
"
{{
file.group
}}"
group
:
"
{{
file.group
}}"
...
...
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