-
Notifications
You must be signed in to change notification settings - Fork 2
/
generate_report.yaml
34 lines (30 loc) · 1.05 KB
/
generate_report.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#
# This Ansible playbook generates an inventory report for all the FSXNs
# in all the AWS regions for the account that it is running under.
#################################################################################
---
- vars:
report_name: output.txt
#################################################################################
#
# Don't change anything below this line.
#
#################################################################################
fsxn_regions: []
opted_in_regions: []
name: Playbook to generate an inventory report on all the FSxNs.
hosts: localhost
collections:
- amazon.aws
gather_facts: false
tasks:
- name: Make sure the report file is empty.
ansible.builtin.shell:
cmd: echo "" > {{ report_name }}
- name: Get all the regions that support FSxN that are opted into.
include_tasks: get_fsxn_regions.yaml
- name: Generate the report for all the FSxNs.
include_tasks: process_region.yaml
loop: "{{ fsxn_regions }}"
loop_control:
loop_var: region