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