Skip to content

Commit 2d2ec25

Browse files
authored
Merge branch 'oracle-devrel:main' into fix_72
2 parents 5cf91c9 + 3ab43f1 commit 2d2ec25

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

ol/build.yml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,7 @@
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
@@ -188,7 +187,6 @@
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:
@@ -211,7 +209,7 @@
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:
@@ -230,7 +228,7 @@
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 }}
@@ -240,3 +238,9 @@
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 }}"

0 commit comments

Comments
 (0)