David K. Bainbridge | 317e7d7 | 2016-05-11 08:31:44 -0700 | [diff] [blame] | 1 | --- |
| 2 | - name: Applications |
| 3 | become: yes |
| 4 | apt: name={{ item }} state=present |
| 5 | with_items: |
| 6 | - build-essential |
| 7 | |
| 8 | - name: Set Default Password |
| 9 | become: yes |
| 10 | user: |
| 11 | name=ubuntu |
| 12 | password="$6$TjhJuOgh8xp.v$z/4GwFbn5koVmkD6Ex9wY7bgP7L3uP2ujZkZSs1HNdzQdz9YclbnZH9GvqMC/M1iwC0MceL05.13HoFz/bai0/" |
| 13 | |
David K. Bainbridge | 39d0c78 | 2016-05-11 13:27:57 -0700 | [diff] [blame^] | 14 | - name: Authorize SSH Key |
| 15 | become: yes |
| 16 | authorized_key: |
| 17 | key="{{ pub_ssh_key }}" |
| 18 | user=ubuntu |
| 19 | state=present |
| 20 | |
| 21 | - name: Verify Private SSH Key |
| 22 | become: yes |
| 23 | stat: |
| 24 | path=/home/ubuntu/.ssh/id_rsa |
| 25 | register: private_key |
| 26 | |
| 27 | - name: Ensure Private SSH Key |
| 28 | become: yes |
| 29 | copy: |
| 30 | src=files/{{ item }} |
| 31 | dest=/home/ubuntu/.ssh/{{ item }} |
| 32 | owner=ubuntu |
| 33 | group=ubuntu |
| 34 | mode=0600 |
| 35 | with_items: |
| 36 | - id_rsa |
| 37 | - id_rsa.pub |
| 38 | |
| 39 | - name: Ensure CORD SUDO |
| 40 | become: yes |
| 41 | copy: |
| 42 | src=files/99-cord-sudoers |
| 43 | dest=/etc/sudoers.d/99-cord-sudoers |
| 44 | owner=root |
| 45 | group=root |
| 46 | mode=0600 |
| 47 | |
David K. Bainbridge | 317e7d7 | 2016-05-11 08:31:44 -0700 | [diff] [blame] | 48 | - name: Verify i40e Driver |
| 49 | command: modinfo --field=version i40e |
| 50 | register: i40e_version |
| 51 | changed_when: False |
| 52 | |
| 53 | - name: Update i40e Driver |
| 54 | include: tasks/i40e_driver.yml |
| 55 | when: i40e_version.stdout != '1.4.25' |
| 56 | |
| 57 | - name: Consistent Interface Naming |
| 58 | become: yes |
| 59 | script: files/rename_ifaces.sh {{ fabric_ip }} |
| 60 | register: ifaces_changed |
| 61 | changed_when: ifaces_changed.stdout != "false" |
| 62 | |
| 63 | - name: Reboot Required |
| 64 | become: yes |
| 65 | command: /sbin/reboot |
| 66 | when: ifaces_changed.stdout != "false" |