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
Boxiang Sun
slapos.package
Commits
7bea2e8d
Commit
7bea2e8d
authored
Jul 02, 2018
by
Guillaume Hervier
Committed by
Rafael Monnerat
Jul 05, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
playbook: Add fstrim timer role
parent
9a1a2cb3
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
45 additions
and
0 deletions
+45
-0
playbook/roles/fstrim/meta/main.yml
playbook/roles/fstrim/meta/main.yml
+5
-0
playbook/roles/fstrim/tasks/main.yml
playbook/roles/fstrim/tasks/main.yml
+23
-0
playbook/roles/fstrim/templates/fstrim.service
playbook/roles/fstrim/templates/fstrim.service
+6
-0
playbook/roles/fstrim/templates/fstrim.timer
playbook/roles/fstrim/templates/fstrim.timer
+11
-0
No files found.
playbook/roles/fstrim/meta/main.yml
0 → 100644
View file @
7bea2e8d
---
dependencies
:
-
role
:
package
package_name
:
util-linux
package_state
:
present
playbook/roles/fstrim/tasks/main.yml
0 → 100644
View file @
7bea2e8d
---
-
name
:
Check if fstrim command exists
stat
:
path
:
/sbin/fstrim
register
:
fstrim
-
name
:
Install systemd files
template
:
src
:
'
{{
item
}}'
dest
:
'
/etc/systemd/system/'
owner
:
root
group
:
root
mode
:
0644
with_items
:
-
fstrim.service
-
fstrim.timer
when
:
fstrim.stat.exists
-
name
:
Enable fstrim timer
service
:
name
:
fstrim.timer
enabled
:
true
when
:
fstrim.stat.exists
playbook/roles/fstrim/templates/fstrim.service
0 → 100644
View file @
7bea2e8d
[Unit]
Description=Discard unused blocks
[Service]
Type=oneshot
ExecStart=/sbin/fstrim -a
playbook/roles/fstrim/templates/fstrim.timer
0 → 100644
View file @
7bea2e8d
[Unit]
Description=Discard unused blocks once a week
Documentation=man:fstrim
[Timer]
OnCalendar=weekly
AccuracySec=1h
Persistent=true
[Install]
WantedBy=multi-user.target
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