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 9090 with_items : " {{ ansible_interfaces | select('match', '^(ens|enp|eth)') | list }}"
9191 when : ansible_facts[item].macaddress is defined and ansible_facts[item].macaddress == mac_addr
9292
93+ - name : Check if kvm hosts added to olvm cluster
94+ ansible.builtin.stat :
95+ path : /tmp/.olvm-provisioned
96+ register : olvm_provision
97+
9398 - name : Assign static IP
9499 community.general.nmcli :
95100 conn_name : " ethernet-{{ interface }}"
99104 gw4 : 10.0.1.1
100105 state : present
101106 become : true
107+ when : not olvm_provision.stat.exists
102108
103109 - name : Add two IPv4 DNS server addresses
104110 community.general.nmcli :
109115 - 169.254.169.254
110116 state : present
111117 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"
1616subnet1_cidr_block : " 10.0.0.0/24"
1717subnet2_cidr_block : " 10.0.1.0/24"
1818vlan_cidr_block : 10.0.10.0/24
19+ oci_config_section : DEFAULT
20+ ad_placement : 1
1921
2022username : " oracle"
2123usergroup : " {{ username }}"
Original file line number Diff line number Diff line change 5858 ovirt_auth : " {{ ovirt_auth }}"
5959 tags :
6060 - 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