-
Notifications
You must be signed in to change notification settings - Fork 4
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
[prancible] adding a new playbook for testing veeam backups to .csvs #5445
base: main
Are you sure you want to change the base?
Conversation
Co-authored-by: G. Philippe Menos <[email protected]> Co-authored-by: John Kazmierski <[email protected]>
Co-authored-by: Alicia Cozine <[email protected]> Co-authored-by: G. Philippe Menos <[email protected]> Co-authored-by: John Kazmierski <[email protected]>
unique_tags: "{{ vms_and_tags.virtual_machines | map(attribute='tags') | flatten | map(attribute='name') | unique }}" | ||
|
||
- name: Create CSV file for tags | ||
copy: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
copy: | |
ansible.builtin.copy: |
delegate_to: localhost | ||
|
||
- name: Append tags to CSV | ||
lineinfile: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lineinfile: | |
ansible.builtin.lineinfile: |
delegate_to: localhost | ||
|
||
- name: Append report date and time to tags CSV | ||
lineinfile: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lineinfile: | |
ansible.builtin.lineinfile: |
untagged_vms: "{{ vms_and_tags.virtual_machines | rejectattr('tags') | map(attribute='guest_name') }}" | ||
|
||
- name: Create CSV file for VMs without tags | ||
copy: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
copy: | |
ansible.builtin.copy: |
delegate_to: localhost | ||
|
||
- name: Append untagged VMs to CSV | ||
lineinfile: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lineinfile: | |
ansible.builtin.lineinfile: |
delegate_to: localhost | ||
|
||
- name: Append report date and time to untagged VMs CSV | ||
lineinfile: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lineinfile: | |
ansible.builtin.lineinfile: |
slim_tagged_vms: "{{ tagged_vms | community.general.json_query('[*].{VM_name: guest_name, Tag_name: tags[0].name, Disk_size: allocated.storage}') }}" | ||
|
||
- name: Create CSV file for VMs with tags | ||
copy: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
copy: | |
ansible.builtin.copy: |
delegate_to: localhost | ||
|
||
- name: Append tagged VMs to CSV | ||
lineinfile: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lineinfile: | |
ansible.builtin.lineinfile: |
delegate_to: localhost | ||
|
||
- name: Append report date and time to tagged VMs CSV | ||
lineinfile: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lineinfile: | |
ansible.builtin.lineinfile: |
Related to #5444