Skip to content

Commit

Permalink
changes from jce
Browse files Browse the repository at this point in the history
  • Loading branch information
l3acon committed Aug 27, 2024
1 parent 4ac3241 commit f2d7ebb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
---
# paameters
# parameters
# snapshot_opeation: <ceate/restore>
- 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', _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', _hosts) | regex_replace(vm_namespace+'-', '') | split(',') | difference(['localhost']) }}"
loop: "{{ lookup('ansible.builtin.inventory_hostnames', snapshot_hosts) | regex_replace(vm_namespace+'-', '') | split(',') | difference(['localhost']) }}"
2 changes: 2 additions & 0 deletions openshift/cnv/snapshot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,5 @@
- name: Include snapshot role
ansible.builtin.include_role:
name: "demo.openshift.snapshot"
vars:
snapshot_hosts: "{{ _hosts }}"

0 comments on commit f2d7ebb

Please sign in to comment.