cp over all the bundles from kunsis bw repo
This commit is contained in:
parent
65b117b819
commit
1f73b04351
89 changed files with 3991 additions and 0 deletions
19
bundles/systemd/files/journald.conf
Normal file
19
bundles/systemd/files/journald.conf
Normal file
|
@ -0,0 +1,19 @@
|
|||
[Journal]
|
||||
Storage=${journal.get('storage', 'persistent')}
|
||||
Compress=yes
|
||||
SplitMode=uid
|
||||
|
||||
# Disable rate limiting.
|
||||
RateLimitIntervalSec=0
|
||||
RateLimitBurst=0
|
||||
|
||||
SystemMaxUse=${journal.get('maxuse', '500M')}
|
||||
SystemKeepFree=${journal.get('keepfree', '2G')}
|
||||
SystemMaxFileSize=100M
|
||||
RuntimeMaxUse=${journal.get('maxuse', '500M')}
|
||||
RuntimeKeepFree=${journal.get('keepfree', '2G')}
|
||||
RuntimeMaxFileSize=100M
|
||||
MaxFileSec=1d
|
||||
|
||||
# Disable auditing
|
||||
Audit=no
|
48
bundles/systemd/items.py
Normal file
48
bundles/systemd/items.py
Normal file
|
@ -0,0 +1,48 @@
|
|||
timezone = node.metadata.get('timezone', 'UTC')
|
||||
|
||||
actions = {
|
||||
'systemd-reload': {
|
||||
'command': 'systemctl daemon-reload',
|
||||
'cascade_skip': False,
|
||||
'triggered': True,
|
||||
'needed_by': {
|
||||
'svc_systemd:',
|
||||
},
|
||||
},
|
||||
'systemd-hostname': {
|
||||
'command': 'hostnamectl set-hostname {}'.format(node.metadata['hostname']),
|
||||
'unless': '[ "$(hostnamectl --static)" = "{}" ]'.format(node.metadata['hostname']),
|
||||
# Provided by bundle:basic
|
||||
'needs': {
|
||||
'file:/etc/hosts',
|
||||
},
|
||||
},
|
||||
'systemd-timezone': {
|
||||
'command': 'timedatectl set-timezone {}'.format(timezone),
|
||||
'unless': 'timedatectl status | grep -Fi \'time zone\' | grep -i \'{}\''.format(timezone.lower()),
|
||||
},
|
||||
'systemd-enable-ntp': {
|
||||
'command': 'timedatectl set-ntp true',
|
||||
'unless': 'timedatectl status | grep -Fi \'ntp service\' | grep -i \'active\'',
|
||||
},
|
||||
}
|
||||
|
||||
files = {
|
||||
'/etc/systemd/journald.conf': {
|
||||
'content_type': 'mako',
|
||||
'context': {
|
||||
'journal': node.metadata.get('systemd/journal', {}),
|
||||
},
|
||||
'triggers': {
|
||||
'svc_systemd:systemd-journald:restart',
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
svc_systemd = {
|
||||
'systemd-journald': {
|
||||
'needs': {
|
||||
'file:/etc/systemd/journald.conf',
|
||||
},
|
||||
},
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue