Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.package
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Guillaume Hervier
slapos.package
Commits
a6cd2991
Commit
a6cd2991
authored
8 years ago
by
Rafael Monnerat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
playbook: Initial commit of etckeeper role
parent
2fd95f06
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
58 additions
and
0 deletions
+58
-0
playbook/roles/etckeeper/tasks/main.yml
playbook/roles/etckeeper/tasks/main.yml
+58
-0
No files found.
playbook/roles/etckeeper/tasks/main.yml
0 → 100644
View file @
a6cd2991
---
-
stat
:
path=/etc/etckeeper/etckeeper.conf
register
:
etckeeper_configuration
-
stat
:
path=/etc/.gitignore
register
:
gitignore_file
-
name
:
Install git
apt
:
name=git state=latest update_cache=no
when
:
ansible_os_family == "Debian"
-
name
:
Install git
yum
:
name=git state=latest update_cache=no
when
:
ansible_os_family == "RedHat"
-
name
:
Install etckeeper
apt
:
name=etckeeper state=latest update_cache=no
when
:
ansible_os_family == "Debian"
-
name
:
Install etckeeper
yum
:
name=etckeeper state=latest update_cache=no
when
:
ansible_os_family == "RedHat"
-
file
:
path=/etc/.gitignore state=touch mode=0660
-
lineinfile
:
path:/etc/.gitignore
line:{{ item }}
when
:
etckeeper_configuration.stat.exists == False
with_items
:
-
~*
-
shadow*
-
passwd*
-
groups*
-
re6stnet/ca.crt
-
re6stnet/cert.crt
-
re6stnet/cert.key
-
opt/slapos/ssl
-
lineinfile
:
path:/etc/etckeeper/etckeeper.conf
line:VCS="git"
when
:
etckeeper_configuration.stat.exists == False
-
shell
:
git config user.email `root@hostname`
when
:
etckeeper_configuration.stat.exists == False
args
:
chdir
:
/etc
-
shell
:
git config user.name `hostname`
when
:
etckeeper_configuration.stat.exists == False
args
:
chdir
:
/etc
-
shell
:
git commit -a -m "Initial Commit"
when
:
etckeeper_configuration.stat.exists == False
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment