blob: 2c8d89685cff1b4d2ff074f8be33e9ee825cfef0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
|
---
- name: Verify variables are set
assert:
that: "{{ item }} is defined"
msg: Run erp_get_build role first
with_items:
- erp_debian_installer_environment
- erp_build_number
- name: Create destination path
file:
path: "/var/lib/tftpboot/debian-{{erp_debian_installer_environment}}/{{erp_build_number}}"
state: directory
- name: Copy over new build
copy:
src: "./builds/debian-{{erp_debian_installer_environment}}/{{erp_build_number}}/{{item}}"
dest: "/var/lib/tftpboot/debian-{{erp_debian_installer_environment}}/{{erp_build_number}}/{{item}}"
with_items:
- "initrd.gz"
- "linux"
- name: Update default for host /var/lib/tftpboot/grub.cfg
blockinfile:
backup: yes
path: /var/lib/tftpboot/grub.cfg
marker: "# {mark} Default for {{macaddress}}"
block: |
if [ "${net_default_mac}" = "{{macaddress}}" ]; then
set timeout=5
set default='Install Debian Jessie - RP {{erp_debian_installer_environment}} - Image {{erp_build_number}} - Automated'
fi
- name: Update menuentry /var/lib/tftpboot/grub.cfg
blockinfile:
path: /var/lib/tftpboot/grub.cfg
insertafter: EOF
marker: "# {mark} debian-{{erp_debian_installer_environment}} {{erp_build_number}}"
block: |
menuentry 'Install Debian Jessie - RP {{erp_debian_installer_environment}} - Image {{erp_build_number}} - Automated' {
linux /debian-{{erp_debian_installer_environment}}/{{erp_build_number}}/linux module_blacklist=mlx5_core auto=true interface=auto priority=critical noshell BOOT_DEBUG=1 DEBIAN_FRONTEND=text url=http://people.linaro.org/~dan.rue/erp-test-automation/releases/17.08/debian/preseed.cfg ---
initrd /debian-{{erp_debian_installer_environment}}/{{erp_build_number}}/initrd.gz
}
# XXX: Replace with automation script
- name: Connect to console
pause:
prompt: "In a separate window, run the following to attach to the amberwing: 'ssh -t aus-colo.linaro.org ipmitool -I lanplus -A PASSWORD -U admin -P Password1 -H {{inventory_hostname}}-bmc sol activate' and then press <enter> to reboot"
- name: amberwing - reboot
command: ipmitool -I lanplus -A PASSWORD -U admin -P Password1 -H {{inventory_hostname}}-bmc chassis power cycle
# TODO: Replace with automation script
- name: Reboot machines and install OS
pause:
prompt: "Install new OS. <enter> once complete"
|