mg
416c36f97c
motd unit house plugins vereinheitlicht aufräumen user vereinheitlicht samba users aufgeräumt aussortiert apc pwr systemd plugin kvm plugins lvm plguin acng plugin munin user chrony fur alle gruppe playbook docker vars playbook firewall munin für alle Co-authored-by: Michael Grote <michael.grote@posteo.de> Reviewed-on: mg/ansible#116 Co-Authored-By: mg <mg@noreply.git.mgrote.net> Co-Committed-By: mg <mg@noreply.git.mgrote.net>
32 lines
735 B
YAML
32 lines
735 B
YAML
---
|
|
- name: stop units
|
|
become: yes
|
|
ansible.builtin.systemd:
|
|
name: motd-news
|
|
masked: yes
|
|
state: stopped
|
|
notify: systemctl_reset_failed
|
|
register: scsstop
|
|
ignore_errors: true
|
|
|
|
- name: disable units
|
|
become: yes
|
|
ansible.builtin.shell: systemctl disable motd-news
|
|
when: scsstop.changed
|
|
|
|
- name: Remove files
|
|
become: yes
|
|
ansible.builtin.file:
|
|
path:
|
|
- rm /etc/systemd/system/motd-news
|
|
- rm /usr/lib/systemd/system/motd-news
|
|
state: absent
|
|
|
|
- name: force systemd to reread configs
|
|
become: yes
|
|
ansible.builtin.systemd:
|
|
daemon_reload: yes
|
|
when: scsstop.changed
|
|
|
|
|
|
# https://superuser.com/questions/513159/how-to-remove-systemd-services
|