-
Notifications
You must be signed in to change notification settings - Fork 3
/
setup.yaml
52 lines (43 loc) · 1.43 KB
/
setup.yaml
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
---
- hosts: runner
gather_facts: no
become: no
tasks:
- name: grep guest IP address
command: awk -F "=" '/guest_ip/ {print $2}' kite-deploy/inventory
register: result_ip
- debug:
var: result_ip.stdout
- name: add guest IP into guest group
community.general.ini_file:
path: "inventory"
section: guest
option: "{{ result_ip.stdout }}"
allow_no_value: yes
- name: grep instance id/name
command: awk -F "=" '/instance/ {print $2}' kite-deploy/inventory
register: result_instance
- debug:
var: result_instance.stdout
- name: add instance id/name into guest group vars
community.general.ini_file:
path: "inventory"
section: guest:vars
option: instance
value: "{{ result_instance.stdout }}"
allow_no_value: yes
- name: grep resource group group name
command: awk -F "=" '/resource_group_name/ {print $2}' kite-deploy/inventory
register: result_resource_group
when: cloud_platform == "azure"
- debug:
var: result_resource_group.stdout
when: cloud_platform == "azure"
- name: add resource group name into guest group vars
community.general.ini_file:
path: "inventory"
section: guest:vars
option: resource_group_name
value: "{{ result_resource_group.stdout }}"
allow_no_value: yes
when: cloud_platform == "azure"