blob: 62abe01f2eaeae9d23a52143d0d60017b68ab670 [file] [log] [blame]
Scott Bakerc41914d2017-06-26 14:00:52 -07001---
2- hosts: cmi
3 connection: ssh
4 user: root
5 vars:
6 eth_device: eth0
7 eth_mac: 02:42:CF:8D:C0:82
8 cmi_password: XOScdn123$
9 cmi_hostname: xos-cloudlab-cmi-vtn.opencloud.us
10 cmi_dns: 8.8.8.8
11 cdn_site: CoBlitz Test
12 cdn_short_name: cobtest
13 cdn_name: CoBlitz
14# gateway_ip: 10.124.0.1
15# gateway_mac: 00:8c:fa:5b:09:d8
16 gateway_ip: 207.141.192.129
17 gateway_mac: a4:23:05:45:56:79
18 node_hostname: xos-cloudlab-node1-vtn.opencloud.us
19 tasks:
20 - name: fix the networking
21 shell: "{{ item }}"
22 with_items:
23 - ifconfig {{ eth_device }} hw ether {{ eth_mac }}
24 - ip route del default || true
25 - ip route add default via {{ gateway_ip }}
26 - arp -s {{ gateway_ip }} {{ gateway_mac }}
27
28 - name: copy over setup answers
29 template: src=templates/setup_answers.txt dest=/root/setup_answers.txt
30
31 - name: run the setup script
32 shell: /a/sbin/setup.sh < /root/setup_answers.txt
33 args:
34 creates: /a/var/log/setup.log
35
36 - name: fix onevapi CDNPrefix bug
37 shell: sed -i 's/hostname/str/g' /vservers/coplc/usr/share/cob_api/COB/PublicObjects/CDNPrefix.py
38
39 - name: fix onevapi OriginServer bug
40 shell: sed -i 's/attrToCheck = "edge_hosttype"/attrToCheck = "edge_hosttype_broken"/g' /vservers/coplc/usr/share/cob_api/COB/PublicObjects/OriginServer.py
41
42 - name: copy over cmi setup template
43 template: src=templates/setup_cmi_onevsh.sh dest=/vservers/coplc/root/setup_cmi_onevsh.sh
44
45 - name: run cmi setup script
46 command: vserver coplc exec onevsh /root/setup_cmi_onevsh.sh
47
48 - name: copy over cmi node setup template
49 template: src=templates/setup_cmi_node.sh dest=/vservers/coplc/root/setup_cmi_node.sh
50
51 - name: run node setup script
52 command: vserver coplc exec plcsh /root/setup_cmi_node.sh
53 args:
54 creates: /vservers/coplc/root/takeover-{{ node_hostname }}
55
56 - name: retrieve node takeover script
57 fetch: src=/vservers/coplc/root/takeover-{{ node_hostname }} dest=takeovers/takeover-{{ node_hostname }}
58
59 - name: update all keys script
60 copy: src=private/allkeys.template dest=/vservers/coplc/etc/onevantage/services/HPC/templates/usr/local/CoBlitz/var/allkeys.template
61
62 - name: install keygen
63 copy: src=private/keygen dest=/vservers/coplc/etc/onevantage/services/HPC/templates/usr/local/CoBlitz/var/keygen mode=0755
64
65 - name: download socat
66 get_url: url=http://pkgs.repoforge.org/socat/socat-1.7.2.1-1.el6.rf.x86_64.rpm dest=/root/socat-1.7.2.1-1.el6.rf.x86_64.rpm
67
68 - name: install socat
69 yum: name=/root/socat-1.7.2.1-1.el6.rf.x86_64.rpm state=present