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 3131 is_management_disabled : false
3232 are_all_plugins_disabled : false
3333 plugins_config :
34- -
35- name : " OS Management Service Agent"
34+ - name : " OS Management Service Agent"
3635 desired_state : DISABLED
3736 key_by : [compartment_id, availability_domain, display_name]
3837 register : result
188187 delay : 30
189188 until : attach_bv is not failed
190189
191-
192190- name : Print the public and private ip of the newly created instance
193191 ansible.builtin.debug :
194192 msg :
211209 ansible_ssh_common_args : " -o StrictHostKeyChecking=no {{ ssh_proxy_cmd | default('') }}"
212210 ansible_host : " {{ instance_public_ip }}"
213211 ansible_port : 22
214- instance_ocid : " {{ my_instance_id }}"
212+ instance_ocid : " {{ instance_id }}"
215213
216214- name : Create host ini file
217215 ansible.builtin.lineinfile :
230228- name : Add host to ini host file
231229 ansible.builtin.lineinfile :
232230 path : hosts
233- regexp : ' ^{{ instance_name }}'
231+ regexp : " ^{{ instance_name }}"
234232 line : >-
235233 {{ instance_name }}
236234 ansible_host={{ instance_ansible_host }}
240238 insertafter : ' ^\[{{ item.value.type }}\]$'
241239 create : true
242240 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