From fe006bdb9ed98f7dd61119c2f0c0da2778e503b4 Mon Sep 17 00:00:00 2001 From: Chris Edillon <67980205+jce-redhat@users.noreply.github.com> Date: Tue, 22 Oct 2024 09:55:55 -0400 Subject: [PATCH] Fix latest pre-commit errors (#189) --- .../demo/openshift/roles/snapshot/tasks/main.yml | 4 ++-- .../demo/openshift/roles/snapshot/tasks/restore.yml | 2 +- multi_select_setup.yml | 3 +-- network/report.yml | 3 ++- openshift/cnv/delete.yml | 6 +++--- openshift/cnv/wait.yml | 2 +- 6 files changed, 10 insertions(+), 10 deletions(-) diff --git a/collections/ansible_collections/demo/openshift/roles/snapshot/tasks/main.yml b/collections/ansible_collections/demo/openshift/roles/snapshot/tasks/main.yml index bc0eead..71d75d1 100644 --- a/collections/ansible_collections/demo/openshift/roles/snapshot/tasks/main.yml +++ b/collections/ansible_collections/demo/openshift/roles/snapshot/tasks/main.yml @@ -4,9 +4,9 @@ - name: Show hostnames we care about ansible.builtin.debug: msg: "About to {{ snapshot_operation }} snapshot(s) for the following hosts: -{{ lookup('ansible.builtin.inventory_hostnames', snapshot_hosts) | split(',') | difference(['localhost'])}}" +{{ lookup('ansible.builtin.inventory_hostnames', snapshot_hosts) | split(',') | difference(['localhost']) }}" - name: Manage snapshots based on operation ansible.builtin.include_tasks: file: "{{ snapshot_operation }}.yml" - loop: "{{ lookup('ansible.builtin.inventory_hostnames', snapshot_hosts) | regex_replace(vm_namespace+'-', '') | split(',') | difference(['localhost']) }}" + loop: "{{ lookup('ansible.builtin.inventory_hostnames', snapshot_hosts) | regex_replace(vm_namespace + '-', '') | split(',') | difference(['localhost']) }}" diff --git a/collections/ansible_collections/demo/openshift/roles/snapshot/tasks/restore.yml b/collections/ansible_collections/demo/openshift/roles/snapshot/tasks/restore.yml index dfe6cb0..a30b964 100644 --- a/collections/ansible_collections/demo/openshift/roles/snapshot/tasks/restore.yml +++ b/collections/ansible_collections/demo/openshift/roles/snapshot/tasks/restore.yml @@ -14,7 +14,7 @@ - name: Set snapshot name for {{ item }} ansible.builtin.set_fact: - latest_snapshot: "{{ snapshot.resources|selectattr('spec.source.name', 'equalto', item)|sort(attribute='metadata.creationTimestamp')|first}}" + latest_snapshot: "{{ snapshot.resources | selectattr('spec.source.name', 'equalto', item) | sort(attribute='metadata.creationTimestamp') | first }}" - name: Stop VirtualMachine redhat.openshift_virtualization.kubevirt_vm: diff --git a/multi_select_setup.yml b/multi_select_setup.yml index 8b89318..8459265 100644 --- a/multi_select_setup.yml +++ b/multi_select_setup.yml @@ -9,8 +9,7 @@ tasks: - name: Build controller launch jobs ansible.builtin.set_fact: - controller_launch_jobs: "{{ (controller_launch_jobs | d([])) - + [launch_jobs | combine( {'extra_vars': { 'demo': item }})] }}" + controller_launch_jobs: "{{ (controller_launch_jobs | d([])) + [launch_jobs | combine({'extra_vars': {'demo': item}})] }}" loop: "{{ demos }}" - name: Default Components diff --git a/network/report.yml b/network/report.yml index 6d183bc..96ae8bd 100644 --- a/network/report.yml +++ b/network/report.yml @@ -20,8 +20,9 @@ gather_network_resources: all when: ansible_network_os == 'cisco.nxos.nxos' + # TODO figure out why this keeps failing - name: Gather all network resource and minimal legacy facts [Cisco IOS XR] - ignore_errors: true + ignore_errors: true # noqa: ignore-errors cisco.iosxr.iosxr_facts: gather_subset: min gather_network_resources: all diff --git a/openshift/cnv/delete.yml b/openshift/cnv/delete.yml index 0a2b5f0..94749bc 100644 --- a/openshift/cnv/delete.yml +++ b/openshift/cnv/delete.yml @@ -5,7 +5,7 @@ - name: Show VM(s) we are about to make {{ instance_state }} ansible.builtin.debug: msg: "Setting the following hosts to {{ instance_state }} -{{ lookup('ansible.builtin.inventory_hostnames', vm_host_string) | split(',') | difference(['localhost'])}}" +{{ lookup('ansible.builtin.inventory_hostnames', vm_host_string) | split(',') | difference(['localhost']) }}" - name: Define resources kubernetes.core.k8s: @@ -31,7 +31,7 @@ spec: sourceRef: kind: DataSource - name: "{{ os_version |default('rhel9') }}" + name: "{{ os_version | default('rhel9') }}" namespace: openshift-virtualization-os-images storage: resources: @@ -79,4 +79,4 @@ - dataVolume: name: "{{ item }}" name: rootdisk - loop: "{{ lookup('ansible.builtin.inventory_hostnames', vm_host_string) | regex_replace(vm_namespace+'-', '') | split(',') | difference(['localhost']) }}" + loop: "{{ lookup('ansible.builtin.inventory_hostnames', vm_host_string) | regex_replace(vm_namespace + '-', '') | split(',') | difference(['localhost']) }}" diff --git a/openshift/cnv/wait.yml b/openshift/cnv/wait.yml index 459d501..50cc159 100644 --- a/openshift/cnv/wait.yml +++ b/openshift/cnv/wait.yml @@ -6,7 +6,7 @@ - name: Wait for ansible.builtin.wait_for: port: 22 - host: '{{ (ansible_ssh_host|default(ansible_host))|default(inventory_hostname) }}' + host: '{{ (ansible_ssh_host | default(ansible_host)) | default(inventory_hostname) }}' search_regex: OpenSSH delay: 10 retries: 10