Skip to content

Fix reported lint issues #78

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 2, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion olvm/create_instance.yml
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@
delay: 30
until: result is not failed

- name: Set private subnet route table id
- name: Set public subnet route table id
ansible.builtin.set_fact:
my_public_rt_id: "{{ result.route_table.id }}"

Expand Down
2 changes: 1 addition & 1 deletion olvm/ovirt_add_hosts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
- oci_vars.yml
vars:
ansible_python_interpreter: "/usr/bin/{{ ovirt_python_version }}"

tasks:

- name: Download ca-cert
Expand Down
2 changes: 1 addition & 1 deletion olvm/ovirt_add_logical_network.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,4 +65,4 @@
state: absent
ovirt_auth: "{{ ovirt_auth }}"
tags:
- always
- always
45 changes: 23 additions & 22 deletions olvm/ovirt_add_storage_domain.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,32 +11,33 @@
vars_files:
- default_vars.yml
- oci_vars.yml
become: yes
become: true
gather_facts: false

tasks:

- name: Get multipath disk information
ansible.builtin.command: multipath -ll
register: multipath_output
run_once: true
- name: Get multipath disk information # noqa: run-once[task]
ansible.builtin.command: multipath -ll
register: multipath_output
changed_when: multipath_output != 0
run_once: true

- name: Extract LUN IDs
ansible.builtin.set_fact:
lun_ids: "{{ multipath_output.stdout_lines | select('search', '^[a-f0-9]') | map('split', ' ') | map(attribute=0) | list }}"
run_once: true
- name: Extract LUN IDs # noqa: run-once[task]
ansible.builtin.set_fact:
lun_ids: "{{ multipath_output.stdout_lines | select('search', '^[a-f0-9]') | map('split', ' ') | map(attribute=0) | list }}"
run_once: true

- name: Display LUN IDs
ansible.builtin.debug:
msg: "LUN IDs: {{ lun_ids }}"
run_once: true
when: debug_enabled
- name: Display LUN IDs # noqa: run-once[task]
ansible.builtin.debug:
msg: "LUN IDs: {{ lun_ids }}"
run_once: true
when: debug_enabled

- name: "Add lun_ids to dummy host"
ansible.builtin.add_host:
name: "LUN_IDS_HOLDER"
lun_ids: "{{ lun_ids }}"
run_once: true
- name: "Add lun_ids to dummy host" # noqa: run-once[task]
ansible.builtin.add_host:
name: "LUN_IDS_HOLDER"
lun_ids: "{{ lun_ids }}"
run_once: true

- name: Add storage domain
hosts: engine
Expand All @@ -45,7 +46,7 @@
- oci_vars.yml
vars:
ansible_python_interpreter: "/usr/bin/{{ ovirt_python_version }}"

tasks:

- name: Connect to the OLVM Engine application # noqa: syntax-check[unknown-module]
Expand All @@ -71,7 +72,7 @@
data_center: Default
domain_function: data
fcp:
lun_id: "{{ hostvars['LUN_IDS_HOLDER']['lun_ids'][ ansible_loop.index0 ] }}"
lun_id: "{{ hostvars['LUN_IDS_HOLDER']['lun_ids'][ansible_loop.index0] }}"
host: "olkvm0{{ ansible_loop.index0 + 1 }}"
name: "amd-storage-domain-0{{ ansible_loop.index0 + 1 }}"
timeout: 2200
Expand All @@ -85,4 +86,4 @@
state: absent
ovirt_auth: "{{ ovirt_auth }}"
tags:
- always
- always
2 changes: 1 addition & 1 deletion olvm/ovirt_check_hosts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@

- name: Print host status
ansible.builtin.debug:
msg: "Host: {{ host_info.results[0].ovirt_hosts[ ansible_loop.index0 ].name }} Status: {{ host_info.results[0].ovirt_hosts[ ansible_loop.index0 ].status }}"
msg: "Host: {{ host_info.results[0].ovirt_hosts[ansible_loop.index0].name }} Status: {{ host_info.results[0].ovirt_hosts[ansible_loop.index0].status }}"
loop: "{{ groups['kvm'] }}"
loop_control:
extended: true
Expand Down
2 changes: 1 addition & 1 deletion olvm/ovirt_create_vm_from_template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,4 +76,4 @@
state: absent
ovirt_auth: "{{ ovirt_auth }}"
tags:
- always
- always
2 changes: 1 addition & 1 deletion olvm/ovirt_import_template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
delegate_to: "{{ groups['kvm'][0] }}"

- name: Import OVA template # noqa: syntax-check[unknown-module]
ovirt_template:
ovirt.ovirt.ovirt_template:
auth:
url: "{{ olvm_engine_url }}"
username: "{{ olvm_username }}"
Expand Down