blob: 7bf99ab14cc16fdb8934b43b3fde06b571164a6f [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:
David K. Bainbridgeb5415042016-05-13 17:06:10 -070011 name={{ ansible_user }}
David K. Bainbridge317e7d72016-05-11 08:31:44 -070012 password="$6$TjhJuOgh8xp.v$z/4GwFbn5koVmkD6Ex9wY7bgP7L3uP2ujZkZSs1HNdzQdz9YclbnZH9GvqMC/M1iwC0MceL05.13HoFz/bai0/"
David K. Bainbridge2a804222016-05-16 12:36:32 -070013 when: '"{{ ansible_user }}" == "ubuntu"'
David K. Bainbridge317e7d72016-05-11 08:31:44 -070014
David K. Bainbridge39d0c782016-05-11 13:27:57 -070015- name: Authorize SSH Key
16 become: yes
17 authorized_key:
18 key="{{ pub_ssh_key }}"
David K. Bainbridgeb5415042016-05-13 17:06:10 -070019 user={{ ansible_user }}
David K. Bainbridge39d0c782016-05-11 13:27:57 -070020 state=present
21
22- name: Verify Private SSH Key
23 become: yes
24 stat:
David K. Bainbridgeb5415042016-05-13 17:06:10 -070025 path=/home/{{ ansible_user }}/.ssh/id_rsa
David K. Bainbridge39d0c782016-05-11 13:27:57 -070026 register: private_key
27
David K. Bainbridgeb5415042016-05-13 17:06:10 -070028- name: Ensure SSH Key
David K. Bainbridge39d0c782016-05-11 13:27:57 -070029 become: yes
30 copy:
31 src=files/{{ item }}
David K. Bainbridgeb5415042016-05-13 17:06:10 -070032 dest=/home/{{ ansible_user }}/.ssh/{{ item }}
33 owner={{ ansible_user }}
34 group={{ ansible_user }}
David K. Bainbridge39d0c782016-05-11 13:27:57 -070035 mode=0600
36 with_items:
37 - id_rsa
38 - id_rsa.pub
39
40- name: Ensure CORD SUDO
41 become: yes
42 copy:
43 src=files/99-cord-sudoers
44 dest=/etc/sudoers.d/99-cord-sudoers
45 owner=root
46 group=root
47 mode=0600
48
David K. Bainbridge317e7d72016-05-11 08:31:44 -070049- name: Verify i40e Driver
50 command: modinfo --field=version i40e
51 register: i40e_version
52 changed_when: False
David K. Bainbridgeb5415042016-05-13 17:06:10 -070053 failed_when: False
David K. Bainbridge4ec841c2016-05-11 22:10:15 -070054 tags:
55 - interface_config
David K. Bainbridge317e7d72016-05-11 08:31:44 -070056
57- name: Update i40e Driver
58 include: tasks/i40e_driver.yml
59 when: i40e_version.stdout != '1.4.25'
David K. Bainbridge4ec841c2016-05-11 22:10:15 -070060 tags:
61 - interface_config
David K. Bainbridge317e7d72016-05-11 08:31:44 -070062
63- name: Consistent Interface Naming
64 become: yes
65 script: files/rename_ifaces.sh {{ fabric_ip }}
66 register: ifaces_changed
67 changed_when: ifaces_changed.stdout != "false"
David K. Bainbridge4ec841c2016-05-11 22:10:15 -070068 tags:
69 - interface_config
David K. Bainbridge317e7d72016-05-11 08:31:44 -070070
71- name: Reboot Required
72 become: yes
73 command: /sbin/reboot
74 when: ifaces_changed.stdout != "false"
David K. Bainbridge4ec841c2016-05-11 22:10:15 -070075 tags:
76 - interface_config