Add cpu/memory accounting to many roles
Signed-off-by: Florian Pritz <bluewind@xinu.at>
This commit is contained in:
parent
0718953bd5
commit
b59d6b99df
20 changed files with 67 additions and 1 deletions
|
@ -61,3 +61,6 @@
|
||||||
|
|
||||||
- name: activate systemd timers for backup
|
- name: activate systemd timers for backup
|
||||||
service: name=borg-backup.timer enabled=yes state=started
|
service: name=borg-backup.timer enabled=yes state=started
|
||||||
|
|
||||||
|
- name: enable systemd ressource accounting
|
||||||
|
command: systemctl set-property borg-backup CPUAccounting=yes MemoryAccounting=yes
|
||||||
|
|
|
@ -6,3 +6,6 @@
|
||||||
- name: activate cronie.service
|
- name: activate cronie.service
|
||||||
service: name=cronie enabled=yes state=started
|
service: name=cronie enabled=yes state=started
|
||||||
|
|
||||||
|
- name: enable systemd ressource accounting
|
||||||
|
command: systemctl set-property cronie CPUAccounting=yes MemoryAccounting=yes
|
||||||
|
|
||||||
|
|
|
@ -17,3 +17,6 @@
|
||||||
- name: start and enable dovecot
|
- name: start and enable dovecot
|
||||||
service: name=dovecot enabled=yes state=started
|
service: name=dovecot enabled=yes state=started
|
||||||
|
|
||||||
|
- name: enable systemd ressource accounting
|
||||||
|
command: systemctl set-property dovecot CPUAccounting=yes MemoryAccounting=yes
|
||||||
|
|
||||||
|
|
|
@ -21,3 +21,6 @@
|
||||||
|
|
||||||
- name: start and enable service
|
- name: start and enable service
|
||||||
service: name=grafana state=started enabled=true
|
service: name=grafana state=started enabled=true
|
||||||
|
|
||||||
|
- name: enable systemd ressource accounting
|
||||||
|
command: systemctl set-property grafana CPUAccounting=yes MemoryAccounting=yes
|
||||||
|
|
|
@ -15,6 +15,9 @@
|
||||||
- name: start and enable the service
|
- name: start and enable the service
|
||||||
service: name=mariadb state=started enabled=yes
|
service: name=mariadb state=started enabled=yes
|
||||||
|
|
||||||
|
- name: enable systemd ressource accounting
|
||||||
|
command: systemctl set-property mariadb CPUAccounting=yes MemoryAccounting=yes
|
||||||
|
|
||||||
- name: delete anonymous users
|
- name: delete anonymous users
|
||||||
mysql_user: user='' host_all=yes state='absent'
|
mysql_user: user='' host_all=yes state='absent'
|
||||||
|
|
||||||
|
|
|
@ -149,3 +149,9 @@
|
||||||
with_items:
|
with_items:
|
||||||
- synapse.service
|
- synapse.service
|
||||||
- matrix-appservice-irc.service
|
- matrix-appservice-irc.service
|
||||||
|
|
||||||
|
- name: enable systemd ressource accounting
|
||||||
|
command: systemctl set-property {{item}} CPUAccounting=yes MemoryAccounting=yes
|
||||||
|
with_items:
|
||||||
|
- synapse
|
||||||
|
- matrix-appservice-irc
|
||||||
|
|
|
@ -65,3 +65,6 @@
|
||||||
|
|
||||||
- name: enable nginx
|
- name: enable nginx
|
||||||
service: name=nginx enabled=yes
|
service: name=nginx enabled=yes
|
||||||
|
|
||||||
|
- name: enable systemd ressource accounting
|
||||||
|
command: systemctl set-property nginx CPUAccounting=yes MemoryAccounting=yes
|
||||||
|
|
|
@ -32,3 +32,6 @@
|
||||||
- name: start and enable opendkim
|
- name: start and enable opendkim
|
||||||
service: name=opendkim enabled=yes state=started
|
service: name=opendkim enabled=yes state=started
|
||||||
|
|
||||||
|
- name: enable systemd ressource accounting
|
||||||
|
command: systemctl set-property opendkim CPUAccounting=yes MemoryAccounting=yes
|
||||||
|
|
||||||
|
|
|
@ -40,3 +40,6 @@
|
||||||
service: name={{ item }} enabled=yes state=started
|
service: name={{ item }} enabled=yes state=started
|
||||||
with_items:
|
with_items:
|
||||||
- planet.timer
|
- planet.timer
|
||||||
|
|
||||||
|
- name: enable systemd ressource accounting
|
||||||
|
command: systemctl set-property planet CPUAccounting=yes MemoryAccounting=yes
|
||||||
|
|
|
@ -62,6 +62,9 @@
|
||||||
- name: start and enable postfix
|
- name: start and enable postfix
|
||||||
service: name=postfix enabled=yes state=started
|
service: name=postfix enabled=yes state=started
|
||||||
|
|
||||||
|
- name: enable systemd ressource accounting
|
||||||
|
command: systemctl set-property postfix CPUAccounting=yes MemoryAccounting=yes
|
||||||
|
|
||||||
- name: remove old files
|
- name: remove old files
|
||||||
file: path={{item}} state=absent
|
file: path={{item}} state=absent
|
||||||
with_items:
|
with_items:
|
||||||
|
|
|
@ -11,4 +11,7 @@
|
||||||
- name: start and enable postfwd
|
- name: start and enable postfwd
|
||||||
service: name=postfwd enabled=yes state=started
|
service: name=postfwd enabled=yes state=started
|
||||||
|
|
||||||
|
- name: enable systemd ressource accounting
|
||||||
|
command: systemctl set-property postfwd CPUAccounting=yes MemoryAccounting=yes
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -65,3 +65,6 @@
|
||||||
- oidentd.socket
|
- oidentd.socket
|
||||||
- quassel.service
|
- quassel.service
|
||||||
- clean-quassel.timer
|
- clean-quassel.timer
|
||||||
|
|
||||||
|
- name: enable systemd ressource accounting
|
||||||
|
command: systemctl set-property quassel CPUAccounting=yes MemoryAccounting=yes
|
||||||
|
|
|
@ -69,3 +69,6 @@
|
||||||
|
|
||||||
- name: start and enable security-tracker timer
|
- name: start and enable security-tracker timer
|
||||||
service: name="security-tracker-update.timer" enabled=yes state=started
|
service: name="security-tracker-update.timer" enabled=yes state=started
|
||||||
|
|
||||||
|
- name: enable systemd ressource accounting
|
||||||
|
command: systemctl set-property security-tracker-update CPUAccounting=yes MemoryAccounting=yes
|
||||||
|
|
|
@ -19,3 +19,6 @@
|
||||||
|
|
||||||
- name: start and enable sogrep units
|
- name: start and enable sogrep units
|
||||||
service: name=createlinks.timer enabled=yes state=started
|
service: name=createlinks.timer enabled=yes state=started
|
||||||
|
|
||||||
|
- name: enable systemd ressource accounting
|
||||||
|
command: systemctl set-property createlinks CPUAccounting=yes MemoryAccounting=yes
|
||||||
|
|
|
@ -49,3 +49,6 @@
|
||||||
|
|
||||||
- name: start spampd
|
- name: start spampd
|
||||||
service: name=spampd enabled=yes state=started
|
service: name=spampd enabled=yes state=started
|
||||||
|
|
||||||
|
- name: enable systemd ressource accounting
|
||||||
|
command: systemctl set-property spampd CPUAccounting=yes MemoryAccounting=yes
|
||||||
|
|
|
@ -16,3 +16,6 @@
|
||||||
|
|
||||||
- name: start and enable sshd
|
- name: start and enable sshd
|
||||||
service: name=sshd enabled=yes state=started
|
service: name=sshd enabled=yes state=started
|
||||||
|
|
||||||
|
- name: enable systemd ressource accounting
|
||||||
|
command: systemctl set-property sshd CPUAccounting=yes MemoryAccounting=yes
|
||||||
|
|
|
@ -27,6 +27,9 @@
|
||||||
- syncrepo.timer
|
- syncrepo.timer
|
||||||
- rsyncd.socket
|
- rsyncd.socket
|
||||||
|
|
||||||
|
- name: enable systemd ressource accounting
|
||||||
|
command: systemctl set-property system-rsyncd.slice CPUAccounting=yes MemoryAccounting=yes
|
||||||
|
|
||||||
- name: set local mirror as cachedir
|
- name: set local mirror as cachedir
|
||||||
lineinfile:
|
lineinfile:
|
||||||
dest: /etc/pacman.conf
|
dest: /etc/pacman.conf
|
||||||
|
|
|
@ -13,3 +13,6 @@
|
||||||
|
|
||||||
- name: Active service
|
- name: Active service
|
||||||
service: name=unbound state=started enabled=yes
|
service: name=unbound state=started enabled=yes
|
||||||
|
|
||||||
|
- name: enable systemd ressource accounting
|
||||||
|
command: systemctl set-property unbound CPUAccounting=yes MemoryAccounting=yes
|
||||||
|
|
|
@ -46,6 +46,12 @@
|
||||||
service: name=nginx-zabbix.service enabled=yes state=started
|
service: name=nginx-zabbix.service enabled=yes state=started
|
||||||
when: "'nginx' in group_names"
|
when: "'nginx' in group_names"
|
||||||
|
|
||||||
|
- name: enable systemd ressource accounting
|
||||||
|
command: systemctl set-property nginx-zabbix CPUAccounting=yes MemoryAccounting=yes
|
||||||
|
when: "'nginx' in group_names"
|
||||||
|
|
||||||
- name: run zabbix agent service
|
- name: run zabbix agent service
|
||||||
service: name=zabbix-agent enabled=yes state=started
|
service: name=zabbix-agent enabled=yes state=started
|
||||||
|
|
||||||
|
- name: enable systemd ressource accounting
|
||||||
|
command: systemctl set-property zabbix-agent CPUAccounting=yes MemoryAccounting=yes
|
||||||
|
|
|
@ -63,5 +63,8 @@
|
||||||
- name: start and enable systemd socket
|
- name: start and enable systemd socket
|
||||||
service: name=php-fpm@zabbix-web.socket state=started enabled=true
|
service: name=php-fpm@zabbix-web.socket state=started enabled=true
|
||||||
|
|
||||||
- name: enable systemd ressource accounting
|
- name: enable systemd ressource accounting php-fpm
|
||||||
command: systemctl set-property php-fpm@zabbix-web CPUAccounting=yes MemoryAccounting=yes
|
command: systemctl set-property php-fpm@zabbix-web CPUAccounting=yes MemoryAccounting=yes
|
||||||
|
|
||||||
|
- name: enable systemd ressource accounting zabbix-server
|
||||||
|
command: systemctl set-property zabbix-server-pgsql CPUAccounting=yes MemoryAccounting=yes
|
||||||
|
|
Loading…
Reference in a new issue