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
Arnaud Véron
slapos.package
Commits
7bea2e8d
Commit
7bea2e8d
authored
6 years ago
by
Guillaume Hervier
Committed by
Rafael Monnerat
6 years ago
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
playbook: Add fstrim timer role
parent
9a1a2cb3
master
add_slapos-base_playbook
alain-kdbox
amarisoft-upgrade
anacron
ansible-report
apt_release_info
bbu
convert_pause_pre_tasks_to_vars_prompt
edgepacer
feat/systemd-resolved
fedora
fix/crontab-timeout
fix/deploy-test-nftable-debian-11
fix/https
fix/py3
fix/repair-standalone-test
generic_improvements
ors
ors-dev
re6st-location
sha256sum
tomo_re6stnet_install
playbook-2.0
No related merge requests found
Changes
4
Hide 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
This diff is collapsed.
Click to expand it.
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
This diff is collapsed.
Click to expand it.
playbook/roles/fstrim/templates/fstrim.service
0 → 100644
View file @
7bea2e8d
[Unit]
Description=Discard unused blocks
[Service]
Type=oneshot
ExecStart=/sbin/fstrim -a
This diff is collapsed.
Click to expand it.
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
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