-
Notifications
You must be signed in to change notification settings - Fork 1
/
cki.yml
73 lines (62 loc) · 1.54 KB
/
cki.yml
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
---
- hosts: "{{ cloud_platform }}"
gather_facts: no
become: no
vars:
project: cki
tasks:
- include_role:
name: kernel
vars:
action: download
- include_role:
name: guest
vars:
action: deploy
os: "{{ lookup('env', 'TEST_OS') }}"
- name: keep private key permission to 600
file:
path: "key/identity"
mode: "0600"
- hosts: guest
tasks:
- include_role:
name: kernel
vars:
action: install
- include_role:
name: test
vars:
run: ltp
- hosts: "{{ cloud_platform }}"
gather_facts: no
become: no
vars:
project: cki
tasks:
- name: get host info
vmware_host_facts:
hostname: "{{ vsphere_server }}"
username: "{{ vsphere_username }}"
password: "{{ vsphere_password }}"
validate_certs: no
esxi_hostname: "{{ esxi_host }}"
register: host_facts
when: cloud_platform == "esxi"
- name: set cloud info varaible
set_fact:
cloud_info: "{{ host_facts.ansible_facts.ansible_distribution }}-{{ host_facts.ansible_facts.ansible_distribution_version }}"
when: cloud_platform == "esxi"
- name: set cloud info variable
set_fact:
cloud_info: "AWS-EC2-{{ aws_region }}-{{ random_instance_type }}"
when: cloud_platform == "aws"
- include_role:
name: umb
vars:
action: send
- include_role:
name: guest
vars:
action: remove
os: "{{ lookup('env', 'TEST_OS') }}"