mg
4e71b78109
Co-authored-by: Michael Grote <michael.grote@posteo.de> Reviewed-on: mg/ansible#330 Co-authored-by: mg <michael.grote@posteo.de> Co-committed-by: mg <michael.grote@posteo.de>
70 lines
1.5 KiB
YAML
70 lines
1.5 KiB
YAML
---
|
|
# - name: install packages
|
|
# become: yes
|
|
# ansible.builtin.package:
|
|
# name:
|
|
# - update-motd
|
|
# state: present
|
|
# when: "ansible_facts['distribution'] == 'Ubuntu'"
|
|
|
|
- name: remove default packages
|
|
become: yes
|
|
ansible.builtin.package:
|
|
name:
|
|
- motd-news-config
|
|
state: absent
|
|
|
|
- name: 'remove unwanted motd messages'
|
|
become: yes
|
|
ansible.builtin.file:
|
|
path: '/etc/update-motd.d/{{ item }}'
|
|
state: absent
|
|
with_items:
|
|
- 00-header
|
|
- 10-help-text
|
|
- 10-uname
|
|
- 50-motd-news
|
|
- 80-livepatch
|
|
- 50-landscape-sysinfo
|
|
- 51-cloudguest
|
|
- 99-esm
|
|
- 00-ansible
|
|
- 20-facts
|
|
- 90-updates
|
|
- 91-reboot
|
|
- 90-updates-available
|
|
- 91-release-upgrade
|
|
|
|
- name: delete "no warranty" - Message
|
|
become: yes
|
|
ansible.builtin.file:
|
|
path: /etc/motd
|
|
state: absent
|
|
|
|
- name: setup new motd
|
|
become: yes
|
|
ansible.builtin.template:
|
|
src: '{{ item }}'
|
|
dest: '/etc/update-motd.d/{{ item }}'
|
|
owner: root
|
|
group: root
|
|
mode: '755'
|
|
with_items:
|
|
- 00-ansible-mgrote
|
|
- 20-facts-mgrote
|
|
- 90-updates-mgrote
|
|
- 91-reboot-mgrote
|
|
|
|
- name: delete fortune
|
|
become: yes
|
|
ansible.builtin.file:
|
|
path: /etc/update-motd.d/05-fortune-mgrote
|
|
state: absent
|
|
when: not motd_fortune_aktiv
|
|
|
|
- name: delete Wetter
|
|
become: yes
|
|
ansible.builtin.file:
|
|
path: '/etc/update-motd.d/10-wetter-mgrote'
|
|
state: absent
|
|
when: not motd_wetter_aktiv
|