diff --git a/ubuntu/roles/common/tasks/main.yml b/ubuntu/roles/common/tasks/main.yml index a043319..4063e2b 100644 --- a/ubuntu/roles/common/tasks/main.yml +++ b/ubuntu/roles/common/tasks/main.yml @@ -64,3 +64,7 @@ - chrony - name: Ensure that the periodic APT cron task clears out old kernels and does unattended security upgrades copy: src=10periodic dest=/etc/apt/apt.conf.d/10periodic backup=yes owner=root group=root mode=0644 +- name: Set hostname + hostname: + name: {{ inventory_hostname }} + use: systemd diff --git a/ubuntu/roles/turn-off-motd-news/tasks/main.yml b/ubuntu/roles/turn-off-motd-news/tasks/main.yml index e665f37..6aa27a2 100644 --- a/ubuntu/roles/turn-off-motd-news/tasks/main.yml +++ b/ubuntu/roles/turn-off-motd-news/tasks/main.yml @@ -2,7 +2,7 @@ # This role turns off the MOTD news in Ubuntu 18.04 - name: Copy motd-news file - when: ansible_distribution_release == 'bionic' + when: ansible_distribution_release == 'bionic' or ansible_distribution_release == 'focal' copy: src: motd-news dest: /etc/default/motd-news