ansible/roles/common/tasks/main.yml

50 lines
1020 B
YAML
Raw Normal View History

2019-09-14 11:49:23 -05:00
#!/usr/bin/ansible-playbook
# vim:ft=ansible:
---
- name: Update and upgrade apt packages
apt:
upgrade: "yes"
2019-09-14 11:49:23 -05:00
update_cache: yes
# One day
cache_valid_time: 86400
become: yes
2019-09-14 11:49:23 -05:00
- name: Install basic packages
apt:
name: "{{ packages }}"
vars:
packages:
- acl
- aptitude
2020-05-10 04:03:30 -05:00
- net-tools
2020-04-26 02:14:02 -05:00
- python3-apt
- vim
become: yes
- name: Set timezone
timezone:
name: "America/Chicago"
2020-05-10 08:22:50 -05:00
become: yes
notify: restart cron
- name: Configure MOTD
block:
- name: Disable MOTD news
copy:
src: "motd-news"
dest: "/etc/default/motd-news"
- name: Disable default update-motd tasks
file:
path: "/etc/update-motd.d/{{ item }}"
state: absent
loop:
- "00-header"
- "10-help-text"
- "50-landscape-sysinfo"
- "50-motd-news"
- "80-esm"
- "80-livepatch"
- "90-updates-available"
- "91-release-upgrade"
- "92-unattended-upgrades"
- "95-hwe-eol"
- "97-overlayroot"
become: yes