File tree Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change 31
31
is_management_disabled : false
32
32
are_all_plugins_disabled : false
33
33
plugins_config :
34
- -
35
- name : " OS Management Service Agent"
34
+ - name : " OS Management Service Agent"
36
35
desired_state : DISABLED
37
36
key_by : [compartment_id, availability_domain, display_name]
38
37
register : result
188
187
delay : 30
189
188
until : attach_bv is not failed
190
189
191
-
192
190
- name : Print the public and private ip of the newly created instance
193
191
ansible.builtin.debug :
194
192
msg :
211
209
ansible_ssh_common_args : " -o StrictHostKeyChecking=no {{ ssh_proxy_cmd | default('') }}"
212
210
ansible_host : " {{ instance_public_ip }}"
213
211
ansible_port : 22
214
- instance_ocid : " {{ my_instance_id }}"
212
+ instance_ocid : " {{ instance_id }}"
215
213
216
214
- name : Create host ini file
217
215
ansible.builtin.lineinfile :
230
228
- name : Add host to ini host file
231
229
ansible.builtin.lineinfile :
232
230
path : hosts
233
- regexp : ' ^{{ instance_name }}'
231
+ regexp : " ^{{ instance_name }}"
234
232
line : >-
235
233
{{ instance_name }}
236
234
ansible_host={{ instance_ansible_host }}
240
238
insertafter : ' ^\[{{ item.value.type }}\]$'
241
239
create : true
242
240
mode : " 0664"
241
+ vars :
242
+ instance_name : " {{ instance_display_name }}"
243
+ instance_ansible_user : opc
244
+ instance_ansible_private_key_file : " {{ lookup('env', 'HOME') + '/.ssh/' + private_key }}"
245
+ instance_ansible_ssh_common_args : " -o StrictHostKeyChecking=no {{ ssh_proxy_cmd | default('') }}"
246
+ instance_ansible_host : " {{ instance_public_ip }}"
You can’t perform that action at this time.
0 commit comments