2 # file: roles/common/tasks/main.yaml
4 - name: Ubuntu specific
5 import_tasks: ubuntu_x86_64.yaml
6 when: ansible_distribution|lower == 'ubuntu' and ansible_machine == 'x86_64'
10 name: '{{ hostname }}'
13 - name: Ensure hostname is in /etc/hosts
16 regexp: '^{{ ansible_default_ipv4.address }}.+$'
17 line: '{{ ansible_default_ipv4.address }} {{ hostname }}.linuxfoundation.org'
24 regexp: '^%admin ALL='
25 line: '%admin ALL=(ALL) ALL'
26 validate: '/usr/sbin/visudo -cf %s'
34 line: '%sudo ALL=(ALL:ALL) NOPASSWD: ALL'
35 validate: '/usr/sbin/visudo -cf %s'
38 - name: Copy grub file
41 dest: '/etc/default/grub'
45 notify: ['Update GRUB']