Skip to content
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

Draft
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

VickieKarasic
Copy link
Contributor

@VickieKarasic VickieKarasic commented Oct 18, 2024

Related to #5444

VickieKarasic and others added 2 commits October 18, 2024 14:19
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]>
@VickieKarasic VickieKarasic changed the title adding a new playbook for testing veeam backups to .csvs [prancible] adding a new playbook for testing veeam backups to .csvs Oct 18, 2024
unique_tags: "{{ vms_and_tags.virtual_machines | map(attribute='tags') | flatten | map(attribute='name') | unique }}"

- name: Create CSV file for tags
copy:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
copy:
ansible.builtin.copy:

delegate_to: localhost

- name: Append tags to CSV
lineinfile:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
lineinfile:
ansible.builtin.lineinfile:

delegate_to: localhost

- name: Append report date and time to tags CSV
lineinfile:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
copy:
ansible.builtin.copy:

delegate_to: localhost

- name: Append untagged VMs to CSV
lineinfile:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
lineinfile:
ansible.builtin.lineinfile:

delegate_to: localhost

- name: Append report date and time to untagged VMs CSV
lineinfile:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
copy:
ansible.builtin.copy:

delegate_to: localhost

- name: Append tagged VMs to CSV
lineinfile:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
lineinfile:
ansible.builtin.lineinfile:

delegate_to: localhost

- name: Append report date and time to tagged VMs CSV
lineinfile:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
lineinfile:
ansible.builtin.lineinfile:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants