|
75 | 75 | ansible.builtin.set_fact: |
76 | 76 | instance_public_ip: "{{ result.vnic.public_ip }}" |
77 | 77 |
|
78 | | -# - name: Add block volume to worker nodes for ceph storage |
79 | | -# when: |
80 | | -# - item.value.type == "worker" |
81 | | -# - add_ceph_block_storage |
82 | | -# block: |
83 | | -# - name: Create block volume for ceph storage |
84 | | -# oracle.oci.oci_blockstorage_volume: |
85 | | -# compartment_id: "{{ my_compartment_id }}" |
86 | | -# availability_domain: "{{ my_availability_domain }}" |
87 | | -# display_name: "blockvolume-{{ item.value.instance_name | default('instance-'~timestamp) }}" |
88 | | -# size_in_gbs: "{{ ceph_volume_size_in_gbs }}" |
89 | | -# register: result |
90 | | -# vars: |
91 | | -# timestamp: "{{ now().strftime('%Y%m%d-%H%M%S') }}" |
92 | | -# retries: 10 |
93 | | -# delay: 30 |
94 | | -# until: result is not failed |
95 | | - |
96 | | -# - name: Set the ceph storage block volume id |
97 | | -# ansible.builtin.set_fact: |
98 | | -# volume_id: "{{ result.volume.id }}" |
99 | | - |
100 | | -# - name: Attach ceph storage block volume |
101 | | -# oracle.oci.oci_compute_volume_attachment: |
102 | | -# instance_id: "{{ instance_id }}" |
103 | | -# type: paravirtualized |
104 | | -# volume_id: "{{ volume_id }}" |
105 | | -# compartment_id: "{{ my_compartment_id }}" |
106 | | -# is_read_only: false |
107 | | -# is_shareable: false |
108 | | -# retries: 10 |
109 | | -# delay: 30 |
110 | | -# until: result is not failed |
| 78 | +- name: Add block storage to an instance |
| 79 | + ansible.builtin.include_tasks: "block.yml" |
| 80 | + loop: "{{ query('sequence', 'start=1 end='+(block_count)|string) }}" |
111 | 81 |
|
112 | 82 | - name: Print the public and private ip of the newly created instance |
113 | 83 | ansible.builtin.debug: |
|
0 commit comments