File tree Expand file tree Collapse file tree 3 files changed +22
-0
lines changed Expand file tree Collapse file tree 3 files changed +22
-0
lines changed Original file line number Diff line number Diff line change 90
90
with_items : " {{ ansible_interfaces | select('match', '^(ens|enp|eth)') | list }}"
91
91
when : ansible_facts[item].macaddress is defined and ansible_facts[item].macaddress == mac_addr
92
92
93
+ - name : Check if kvm hosts added to olvm cluster
94
+ ansible.builtin.stat :
95
+ path : /tmp/.olvm-provisioned
96
+ register : olvm_provision
97
+
93
98
- name : Assign static IP
94
99
community.general.nmcli :
95
100
conn_name : " ethernet-{{ interface }}"
99
104
gw4 : 10.0.1.1
100
105
state : present
101
106
become : true
107
+ when : not olvm_provision.stat.exists
102
108
103
109
- name : Add two IPv4 DNS server addresses
104
110
community.general.nmcli :
109
115
- 169.254.169.254
110
116
state : present
111
117
become : true
118
+ when : not olvm_provision.stat.exists
Original file line number Diff line number Diff line change @@ -16,6 +16,8 @@ instance_shape: "VM.Standard.E4.Flex"
16
16
subnet1_cidr_block : " 10.0.0.0/24"
17
17
subnet2_cidr_block : " 10.0.1.0/24"
18
18
vlan_cidr_block : 10.0.10.0/24
19
+ oci_config_section : DEFAULT
20
+ ad_placement : 1
19
21
20
22
username : " oracle"
21
23
usergroup : " {{ username }}"
Original file line number Diff line number Diff line change 58
58
ovirt_auth : " {{ ovirt_auth }}"
59
59
tags :
60
60
- always
61
+
62
+ - name : Create .olvm-provisioned file in /tmp
63
+ hosts : engine:kvm
64
+ vars_files :
65
+ - default_vars.yml
66
+
67
+ tasks :
68
+
69
+ - name : Create provisioned status file
70
+ ansible.builtin.file :
71
+ path : /tmp/.olvm-provisioned
72
+ state : touch
73
+ mode : ' 0755'
You can’t perform that action at this time.
0 commit comments