ansible/roles/common/tasks/main.yml
Salt 5972c8f7e7 Configure running services
In particular, disable unattended-upgrades as it may interfere with ansible-pull
2020-07-04 19:50:55 -05:00

49 lines
1.3 KiB
YAML

#!/usr/bin/ansible-playbook
# vim:ft=ansible:
---
- name: Configure basic system settings
block:
- name: Install packages
include_tasks: packages.yml
- name: Copy system configs
template:
src: "{{ item.src }}"
dest: "{{ item.dest }}"
mode: "{{ item.mode }}"
loop:
- { src: "hosts", dest: "/etc/hosts", mode: "0644" }
- name: Set hostname
hostname:
name: "{{ inventory_hostname }}"
- name: Set timezone
timezone:
name: "America/Chicago"
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"
- name: Configure Ansible user
include_tasks: ansibleuser.yml
- name: Configure services
include_tasks: services.yml
become: yes