Fix latest pre-commit errors (#189)

This commit is contained in:
Chris Edillon
2024-10-22 09:55:55 -04:00
committed by GitHub
parent a257597a7d
commit fe006bdb9e
6 changed files with 10 additions and 10 deletions

View File

@@ -4,9 +4,9 @@
- name: Show hostnames we care about - name: Show hostnames we care about
ansible.builtin.debug: ansible.builtin.debug:
msg: "About to {{ snapshot_operation }} snapshot(s) for the following hosts: 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 - name: Manage snapshots based on operation
ansible.builtin.include_tasks: ansible.builtin.include_tasks:
file: "{{ snapshot_operation }}.yml" 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']) }}"

View File

@@ -14,7 +14,7 @@
- name: Set snapshot name for {{ item }} - name: Set snapshot name for {{ item }}
ansible.builtin.set_fact: 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 - name: Stop VirtualMachine
redhat.openshift_virtualization.kubevirt_vm: redhat.openshift_virtualization.kubevirt_vm:

View File

@@ -9,8 +9,7 @@
tasks: tasks:
- name: Build controller launch jobs - name: Build controller launch jobs
ansible.builtin.set_fact: ansible.builtin.set_fact:
controller_launch_jobs: "{{ (controller_launch_jobs | d([])) controller_launch_jobs: "{{ (controller_launch_jobs | d([])) + [launch_jobs | combine({'extra_vars': {'demo': item}})] }}"
+ [launch_jobs | combine( {'extra_vars': { 'demo': item }})] }}"
loop: "{{ demos }}" loop: "{{ demos }}"
- name: Default Components - name: Default Components

View File

@@ -20,8 +20,9 @@
gather_network_resources: all gather_network_resources: all
when: ansible_network_os == 'cisco.nxos.nxos' 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] - 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: cisco.iosxr.iosxr_facts:
gather_subset: min gather_subset: min
gather_network_resources: all gather_network_resources: all

View File

@@ -5,7 +5,7 @@
- name: Show VM(s) we are about to make {{ instance_state }} - name: Show VM(s) we are about to make {{ instance_state }}
ansible.builtin.debug: ansible.builtin.debug:
msg: "Setting the following hosts to {{ instance_state }} 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 - name: Define resources
kubernetes.core.k8s: kubernetes.core.k8s:
@@ -31,7 +31,7 @@
spec: spec:
sourceRef: sourceRef:
kind: DataSource kind: DataSource
name: "{{ os_version |default('rhel9') }}" name: "{{ os_version | default('rhel9') }}"
namespace: openshift-virtualization-os-images namespace: openshift-virtualization-os-images
storage: storage:
resources: resources:
@@ -79,4 +79,4 @@
- dataVolume: - dataVolume:
name: "{{ item }}" name: "{{ item }}"
name: rootdisk 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']) }}"

View File

@@ -6,7 +6,7 @@
- name: Wait for - name: Wait for
ansible.builtin.wait_for: ansible.builtin.wait_for:
port: 22 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 search_regex: OpenSSH
delay: 10 delay: 10
retries: 10 retries: 10