Skip to content

Commit

Permalink
Merge branch 'main' into aap25
Browse files Browse the repository at this point in the history
  • Loading branch information
l3acon authored Oct 23, 2024
2 parents ea7334b + fe006bd commit 93d745c
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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']) }}"
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
3 changes: 1 addition & 2 deletions multi_select_setup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions network/report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
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 # noqa: ignore-errors
cisco.iosxr.iosxr_facts:
Expand Down
6 changes: 3 additions & 3 deletions openshift/cnv/delete.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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:
Expand Down Expand Up @@ -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']) }}"
2 changes: 1 addition & 1 deletion openshift/cnv/wait.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 93d745c

Please sign in to comment.