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
Carlos Ramos Carreño
slapos.package
Commits
fcae174d
Commit
fcae174d
authored
9 years ago
by
Alain Takoudjou
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Ansible: add logrotate role
parent
9a2be62c
master
alain-kdbox
amarisoft-upgrade
apt_release_info
atomic-upgrade
bbu
cdn-test
drop_var_prompt
edgepacer
feat/systemd-resolved
feature/ntp_sles15_chrony
fedora
fix/ansible_includes
fix/crontab-timeout
fix/deploy-test-nftable-debian-11
fix/https
fix/py3
fix/repair-standalone-test
fix/suse_repository
generic_improvements
local-frontend
no-fw
ors-dev
re6st
slapos-master-standalone-fix
tomo_re6stnet_install
vmhost
wait-internet
playbook-2.0
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
37 additions
and
0 deletions
+37
-0
playbook/imt-vm-bootstrap.yml
playbook/imt-vm-bootstrap.yml
+11
-0
playbook/roles/logrotate/tasks/main.yml
playbook/roles/logrotate/tasks/main.yml
+10
-0
playbook/roles/logrotate/templates/logrotate.d.j2
playbook/roles/logrotate/templates/logrotate.d.j2
+16
-0
No files found.
playbook/imt-vm-bootstrap.yml
View file @
fcae174d
...
...
@@ -25,4 +25,15 @@
-
{
role
:
vm-disks
,
vd_disk
:
s
,
data_n
:
12
}
-
{
role
:
vm-disks
,
vd_disk
:
t
,
data_n
:
12
}
-
{
role
:
vm-disks
,
vd_disk
:
u
,
data_n
:
12
}
-
role
:
logrotate
logrotate_scripts
:
-
name
:
vm-bootstrap
path
:
/var/log/vm-bootstrap.log
options
:
-
weekly
-
compress
-
rotate
5
-
notifempty
-
create
-
dateext
This diff is collapsed.
Click to expand it.
playbook/roles/logrotate/tasks/main.yml
0 → 100644
View file @
fcae174d
---
-
name
:
Install logrotate
action
:
"
{{ansible_pkg_mgr}}
pkg=logrotate
state=present"
-
name
:
Configure logrotate.d scripts
template
:
src
:
logrotate.d.j2
dest
:
/etc/logrotate.d/{{ item.name }}
with_items
:
logrotate_scripts
when
:
logrotate_scripts is defined
This diff is collapsed.
Click to expand it.
playbook/roles/logrotate/templates/logrotate.d.j2
0 → 100644
View file @
fcae174d
# {{ ansible_managed }}
"{{ item.path }}" {
{% if item.options is defined -%}
{% for option in item.options -%}
{{ option }}
{% endfor -%}
{% endif %}
{%- if item.scripts is defined -%}
{%- for name, script in item.scripts.iteritems() -%}
{{ name }}
{{ script }}
endscript
{% endfor -%}
{% endif -%}
}
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