1111 vars_files :
1212 - default_vars.yml
1313 - oci_vars.yml
14- become : yes
14+ become : true
1515 gather_facts : false
1616
1717 tasks :
1818
19- - name : Get multipath disk information
20- ansible.builtin.command : multipath -ll
21- register : multipath_output
22- run_once : true
19+ - name : Get multipath disk information # noqa: run-once[task]
20+ ansible.builtin.command : multipath -ll
21+ register : multipath_output
22+ changed_when : multipath_output != 0
23+ run_once : true
2324
24- - name : Extract LUN IDs
25- ansible.builtin.set_fact :
26- lun_ids : " {{ multipath_output.stdout_lines | select('search', '^[a-f0-9]') | map('split', ' ') | map(attribute=0) | list }}"
27- run_once : true
25+ - name : Extract LUN IDs # noqa: run-once[task]
26+ ansible.builtin.set_fact :
27+ lun_ids : " {{ multipath_output.stdout_lines | select('search', '^[a-f0-9]') | map('split', ' ') | map(attribute=0) | list }}"
28+ run_once : true
2829
29- - name : Display LUN IDs
30- ansible.builtin.debug :
31- msg : " LUN IDs: {{ lun_ids }}"
32- run_once : true
33- when : debug_enabled
30+ - name : Display LUN IDs # noqa: run-once[task]
31+ ansible.builtin.debug :
32+ msg : " LUN IDs: {{ lun_ids }}"
33+ run_once : true
34+ when : debug_enabled
3435
35- - name : " Add lun_ids to dummy host"
36- ansible.builtin.add_host :
37- name : " LUN_IDS_HOLDER"
38- lun_ids : " {{ lun_ids }}"
39- run_once : true
36+ - name : " Add lun_ids to dummy host" # noqa: run-once[task]
37+ ansible.builtin.add_host :
38+ name : " LUN_IDS_HOLDER"
39+ lun_ids : " {{ lun_ids }}"
40+ run_once : true
4041
4142- name : Add storage domain
4243 hosts : engine
4546 - oci_vars.yml
4647 vars :
4748 ansible_python_interpreter : " /usr/bin/{{ ovirt_python_version }}"
48-
49+
4950 tasks :
5051
5152 - name : Connect to the OLVM Engine application # noqa: syntax-check[unknown-module]
7172 data_center : Default
7273 domain_function : data
7374 fcp :
74- lun_id : " {{ hostvars['LUN_IDS_HOLDER']['lun_ids'][ ansible_loop.index0 ] }}"
75+ lun_id : " {{ hostvars['LUN_IDS_HOLDER']['lun_ids'][ansible_loop.index0] }}"
7576 host : " olkvm0{{ ansible_loop.index0 + 1 }}"
7677 name : " amd-storage-domain-0{{ ansible_loop.index0 + 1 }}"
7778 timeout : 2200
8586 state : absent
8687 ovirt_auth : " {{ ovirt_auth }}"
8788 tags :
88- - always
89+ - always
0 commit comments