Skip to content

Commit f461aa1

Browse files
author
William Graef
committed
add loop control and index0
1 parent a662def commit f461aa1

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

ol/block.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
type: paravirtualized
3232
volume_id: "{{ volume_id }}"
3333
compartment_id: "{{ my_compartment_id }}"
34-
device: "{{ block_devices[ansible_loop.index] }}"
34+
device: "/dev/oracleoci/oraclevd{{ block_devices[ansible_loop.index0] }}"
3535
is_read_only: false
3636
is_shareable: false
3737
retries: 10

ol/build.yml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -78,13 +78,15 @@
7878
- name: Add block storage to an instance
7979
ansible.builtin.include_tasks: "block.yml"
8080
loop: "{{ query('sequence', 'start=1 end='+(block_count)|string) }}"
81+
loop_control:
82+
extended: true
8183
vars:
8284
block_devices:
83-
- sdb
84-
- sdc
85-
- sdd
86-
- sde
87-
- sdf
85+
- b
86+
- c
87+
- d
88+
- e
89+
- f
8890

8991
- name: Print the public and private ip of the newly created instance
9092
ansible.builtin.debug:

0 commit comments

Comments
 (0)