blob: f3ee4aa913cc5766b2d74fe75e0abf91fff9bbc3 [file] [log] [blame]
David K. Bainbridge317e7d72016-05-11 08:31:44 -07001---
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. Bainbridge39d0c782016-05-11 13:27:57 -070014- 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. Bainbridge317e7d72016-05-11 08:31:44 -070048- name: Verify i40e Driver
49 command: modinfo --field=version i40e
50 register: i40e_version
51 changed_when: False
David K. Bainbridge4ec841c2016-05-11 22:10:15 -070052 tags:
53 - interface_config
David K. Bainbridge317e7d72016-05-11 08:31:44 -070054
55- name: Update i40e Driver
56 include: tasks/i40e_driver.yml
57 when: i40e_version.stdout != '1.4.25'
David K. Bainbridge4ec841c2016-05-11 22:10:15 -070058 tags:
59 - interface_config
David K. Bainbridge317e7d72016-05-11 08:31:44 -070060
61- name: Consistent Interface Naming
62 become: yes
63 script: files/rename_ifaces.sh {{ fabric_ip }}
64 register: ifaces_changed
65 changed_when: ifaces_changed.stdout != "false"
David K. Bainbridge4ec841c2016-05-11 22:10:15 -070066 tags:
67 - interface_config
David K. Bainbridge317e7d72016-05-11 08:31:44 -070068
69- name: Reboot Required
70 become: yes
71 command: /sbin/reboot
72 when: ifaces_changed.stdout != "false"
David K. Bainbridge4ec841c2016-05-11 22:10:15 -070073 tags:
74 - interface_config