From 61ef529d33efd51acd1b1986c325d25a9d7ba705 Mon Sep 17 00:00:00 2001 From: Vratko Polak Date: Mon, 9 Jul 2018 15:14:36 +0200 Subject: Remove THIS tag and use unix endlines The THIS tag has sneaked in 10Ge2P1X520-Eth-L2Xcbase-Eth-1Memif-1Dcr-Mrr but usually it is only to be used in draft testing. Not sure about the way non-unix endlines crept in. Is not git supposed to perform endline conversions on text files? Or are .robot, .rst, .yaml and .vat not recognized as text? Change-Id: Ia78cf942c05c3029c340a8639782786f37e57469 Signed-off-by: Vratko Polak --- .../ansible/roles/common/tasks/main.yaml | 92 +++++++++++----------- 1 file changed, 46 insertions(+), 46 deletions(-) (limited to 'resources/tools/testbed-setup/ansible/roles/common/tasks/main.yaml') diff --git a/resources/tools/testbed-setup/ansible/roles/common/tasks/main.yaml b/resources/tools/testbed-setup/ansible/roles/common/tasks/main.yaml index e16a6a7356..06058a427b 100644 --- a/resources/tools/testbed-setup/ansible/roles/common/tasks/main.yaml +++ b/resources/tools/testbed-setup/ansible/roles/common/tasks/main.yaml @@ -1,46 +1,46 @@ ---- -# file: roles/common/tasks/main.yaml - -- name: Ubuntu specific - import_tasks: ubuntu_x86_64.yaml - when: ansible_distribution|lower == 'ubuntu' and ansible_machine == 'x86_64' - -- name: Set hostname - hostname: - name: '{{ hostname }}' - tags: set-hostname - -- name: Ensure hostname is in /etc/hosts - lineinfile: - path: '/etc/hosts' - regexp: '^{{ ansible_default_ipv4.address }}.+$' - line: '{{ ansible_default_ipv4.address }} {{ hostname }}.linuxfoundation.org' - tags: set-hostname - -- name: Set sudoers - lineinfile: - path: '/etc/sudoers' - state: 'present' - regexp: '^%admin ALL=' - line: '%admin ALL=(ALL) ALL' - validate: '/usr/sbin/visudo -cf %s' - tags: set-sudoers - -- name: Set sudoers - lineinfile: - path: '/etc/sudoers' - state: 'present' - regexp: '^%sudo' - line: '%sudo ALL=(ALL:ALL) NOPASSWD: ALL' - validate: '/usr/sbin/visudo -cf %s' - tags: set-sudoers - -- name: Copy grub file - template: - src: 'files/grub' - dest: '/etc/default/grub' - owner: 'root' - group: 'root' - mode: '644' - notify: ['Update GRUB'] - tags: copy-grub +--- +# file: roles/common/tasks/main.yaml + +- name: Ubuntu specific + import_tasks: ubuntu_x86_64.yaml + when: ansible_distribution|lower == 'ubuntu' and ansible_machine == 'x86_64' + +- name: Set hostname + hostname: + name: '{{ hostname }}' + tags: set-hostname + +- name: Ensure hostname is in /etc/hosts + lineinfile: + path: '/etc/hosts' + regexp: '^{{ ansible_default_ipv4.address }}.+$' + line: '{{ ansible_default_ipv4.address }} {{ hostname }}.linuxfoundation.org' + tags: set-hostname + +- name: Set sudoers + lineinfile: + path: '/etc/sudoers' + state: 'present' + regexp: '^%admin ALL=' + line: '%admin ALL=(ALL) ALL' + validate: '/usr/sbin/visudo -cf %s' + tags: set-sudoers + +- name: Set sudoers + lineinfile: + path: '/etc/sudoers' + state: 'present' + regexp: '^%sudo' + line: '%sudo ALL=(ALL:ALL) NOPASSWD: ALL' + validate: '/usr/sbin/visudo -cf %s' + tags: set-sudoers + +- name: Copy grub file + template: + src: 'files/grub' + dest: '/etc/default/grub' + owner: 'root' + group: 'root' + mode: '644' + notify: ['Update GRUB'] + tags: copy-grub -- cgit 1.2.3-korg