├── .gitignore ├── roles ├── retrieve_common_info │ ├── defaults │ │ └── main.yml │ └── tasks │ │ └── main.yml ├── template │ ├── files │ │ ├── aws.png │ │ ├── router.png │ │ ├── webpage_logo.png │ │ └── redhat-ansible-logo.svg │ ├── README.md │ ├── vars │ │ └── main.yml │ ├── templates │ │ ├── header.j2 │ │ ├── ansible.j2 │ │ ├── report.j2 │ │ └── vpc.j2 │ └── tasks │ │ └── main.yml ├── build_report_s3 │ ├── vars │ │ └── main.yml │ ├── README.md │ ├── templates │ │ └── policy.json │ └── tasks │ │ └── main.yml ├── build_report_tags │ ├── files │ │ ├── aws.png │ │ ├── report.png │ │ ├── router.png │ │ ├── webpage_logo.png │ │ └── ansible-logo.svg │ ├── templates │ │ ├── header.j2 │ │ ├── footer.j2 │ │ ├── landing_page.j2 │ │ └── tags_report.j2 │ ├── defaults │ │ └── main.yml │ └── tasks │ │ └── main.yml ├── build_report_linux │ ├── files │ │ ├── aws.png │ │ ├── router.png │ │ ├── webpage_logo.png │ │ └── redhat-ansible-logo.svg │ ├── README.md │ ├── vars │ │ └── main.yml │ ├── templates │ │ ├── header.j2 │ │ ├── ansible.j2 │ │ ├── vpc.backup │ │ ├── vpc.backupApril172023 │ │ ├── report.j2 │ │ └── vpc.j2 │ └── tasks │ │ └── main.yml ├── retrieve_info │ ├── defaults │ │ └── main.yml │ └── tasks │ │ ├── main.yml │ │ └── retrieve_info.yml └── retrieve_aws_instances_info │ └── tasks │ └── main.yml ├── collections └── ansible_collections │ └── demo │ └── patching │ ├── roles │ ├── build_report_network │ │ ├── vars │ │ │ └── main.yml │ │ ├── files │ │ │ ├── router.png │ │ │ ├── webpage_logo.png │ │ │ └── css │ │ │ │ └── new.css │ │ ├── example_results │ │ │ └── Ansible Network Automation Report.png │ │ ├── templates │ │ │ ├── header.j2 │ │ │ ├── summary.j2 │ │ │ ├── ospf.j2 │ │ │ ├── lacp.j2 │ │ │ ├── bgp.j2 │ │ │ ├── vlans.j2 │ │ │ ├── lldp_interfaces.j2 │ │ │ ├── interfaces.j2 │ │ │ ├── l2_interfaces.j2 │ │ │ ├── l3_interfaces.j2 │ │ │ └── report.j2 │ │ ├── tasks │ │ │ └── main.yml │ │ └── README.md │ ├── build_report_windows │ │ ├── vars │ │ │ └── main.yml │ │ ├── defaults │ │ │ └── main.yml │ │ ├── files │ │ │ ├── server.png │ │ │ ├── webpage_logo.png │ │ │ └── css │ │ │ │ └── new.css │ │ ├── example_results │ │ │ └── Ansible Windows Automation Report.png │ │ ├── templates │ │ │ ├── header.j2 │ │ │ ├── packages.j2 │ │ │ ├── services.j2 │ │ │ └── report.j2 │ │ ├── tasks │ │ │ └── main.yml │ │ └── README.md │ ├── report_linux │ │ ├── defaults │ │ │ └── main.yml │ │ ├── vars │ │ │ └── main.yml │ │ ├── files │ │ │ ├── server.png │ │ │ ├── webpage_logo.png │ │ │ └── css │ │ │ │ └── new.css │ │ ├── example_results │ │ │ └── Ansible Linux Automation Report.png │ │ ├── templates │ │ │ ├── header.j2 │ │ │ ├── packages.j2 │ │ │ ├── services.j2 │ │ │ └── report.j2 │ │ ├── README.md │ │ └── tasks │ │ │ └── main.yml │ ├── report_windows │ │ ├── defaults │ │ │ └── main.yml │ │ ├── vars │ │ │ └── main.yml │ │ ├── files │ │ │ ├── server.png │ │ │ ├── webpage_logo.png │ │ │ └── css │ │ │ │ └── new.css │ │ ├── example_results │ │ │ └── Ansible Windows Automation Report.png │ │ ├── templates │ │ │ ├── header.j2 │ │ │ ├── packages.j2 │ │ │ ├── services.j2 │ │ │ └── report.j2 │ │ ├── README.md │ │ └── tasks │ │ │ └── main.yml │ ├── build_report_windows_patch │ │ ├── vars │ │ │ └── main.yml │ │ ├── defaults │ │ │ └── main.yml │ │ ├── files │ │ │ ├── webpage_logo.png │ │ │ └── css │ │ │ │ └── main.css │ │ ├── example_results │ │ │ └── Full_Report.png │ │ ├── README.md │ │ ├── tasks │ │ │ └── main.yml │ │ └── templates │ │ │ └── report.j2 │ ├── report_linux_patching │ │ ├── vars │ │ │ └── main.yml │ │ ├── defaults │ │ │ └── main.yml │ │ ├── files │ │ │ ├── webpage_logo.png │ │ │ └── css │ │ │ │ └── main.css │ │ ├── example_results │ │ │ ├── Full_Report.png │ │ │ └── Splunk Patching Aggregated RHEL 8.png │ │ ├── README.md │ │ ├── tasks │ │ │ └── main.yml │ │ └── templates │ │ │ └── report.j2 │ ├── report_windows_patching │ │ ├── vars │ │ │ └── main.yml │ │ ├── defaults │ │ │ └── main.yml │ │ ├── files │ │ │ ├── webpage_logo.png │ │ │ └── css │ │ │ │ └── main.css │ │ ├── example_results │ │ │ └── Full_Report.png │ │ ├── tasks │ │ │ └── main.yml │ │ ├── README.md │ │ └── templates │ │ │ └── report.j2 │ ├── patch_linux │ │ ├── defaults │ │ │ └── main.yml │ │ └── tasks │ │ │ └── main.yml │ ├── report_server │ │ ├── vars │ │ │ ├── Linux.yml │ │ │ └── Win32NT.yml │ │ ├── files │ │ │ ├── report.png │ │ │ ├── webpage_logo.png │ │ │ └── css │ │ │ │ └── new.css │ │ ├── tasks │ │ │ ├── main.yml │ │ │ ├── apache.yml │ │ │ ├── iis.yml │ │ │ ├── linux_landing_page.yml │ │ │ └── windows_landing_page.yml │ │ └── templates │ │ │ ├── header.j2 │ │ │ ├── linux_report.j2 │ │ │ └── windows_report.j2 │ └── patch_windows │ │ ├── defaults │ │ └── main.yml │ │ └── tasks │ │ └── main.yml │ └── plugins │ └── modules │ ├── win_scan_packages.py │ ├── win_scan_services.py │ ├── win_scan_services.ps1 │ ├── win_scan_packages.ps1 │ └── scan_packages.py ├── ansible.cfg ├── .vscode └── settings.json ├── playbooks ├── cloud_report_tags.yml ├── info_vpcs.yml ├── info_igws.yml ├── info_instances.yml ├── stop_aws_ec2_instances.yml ├── lab2-patching.yml ├── aws_ssm.yml ├── info_combined.yml ├── lab2-deploy-application.yml ├── templates │ └── display.j2 ├── cloud_report.yml ├── lab2-ec2-info.yml ├── tag_info_aws.yml ├── lab3-challenge2.yml ├── aws_ssm_assume.yml ├── aws_instances.yml └── aws_resources.yml └── 1dRHEL ├── 1dwf2-Create-VPC.yml ├── 1dwf1-Create-ssh-key-pair.yml ├── 1dwf4-Create-internet-gateway.yml ├── 1dwf3-Create-security-group.yml ├── 1dwf5-Create-RHEL-server.yml └── 1d-Teardown-all-AWS-WF-resources.yml /.gitignore: -------------------------------------------------------------------------------- 1 | *.pem 2 | *.DS_Store 3 | -------------------------------------------------------------------------------- /roles/retrieve_common_info/defaults/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | ec2_region: 'us-east-1' 3 | -------------------------------------------------------------------------------- /collections/ansible_collections/demo/patching/roles/build_report_network/vars/main.yml: -------------------------------------------------------------------------------- 1 | file_path: /var/www/html -------------------------------------------------------------------------------- /collections/ansible_collections/demo/patching/roles/build_report_windows/vars/main.yml: -------------------------------------------------------------------------------- 1 | file_path: /var/www/html -------------------------------------------------------------------------------- /collections/ansible_collections/demo/patching/roles/report_linux/defaults/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | detailedreport: True -------------------------------------------------------------------------------- /collections/ansible_collections/demo/patching/roles/report_linux/vars/main.yml: -------------------------------------------------------------------------------- 1 | file_path: /var/www/html/reports -------------------------------------------------------------------------------- /collections/ansible_collections/demo/patching/roles/report_windows/defaults/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | detailedreport: True -------------------------------------------------------------------------------- /collections/ansible_collections/demo/patching/roles/build_report_windows/defaults/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | detailedreport: True -------------------------------------------------------------------------------- /collections/ansible_collections/demo/patching/roles/build_report_windows_patch/vars/main.yml: -------------------------------------------------------------------------------- 1 | file_path: /var/www/html -------------------------------------------------------------------------------- /collections/ansible_collections/demo/patching/roles/report_windows/vars/main.yml: -------------------------------------------------------------------------------- 1 | file_path: C:\Inetpub\wwwroot\reports -------------------------------------------------------------------------------- /roles/template/files/aws.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ansible-cloud/aws_demos/HEAD/roles/template/files/aws.png -------------------------------------------------------------------------------- /ansible.cfg: -------------------------------------------------------------------------------- 1 | [defaults] 2 | deprecation_warnings = False 3 | stdout_callback = yaml 4 | collections_paths=./collections 5 | -------------------------------------------------------------------------------- /collections/ansible_collections/demo/patching/roles/report_linux_patching/vars/main.yml: -------------------------------------------------------------------------------- 1 | file_path: /var/www/html/reports -------------------------------------------------------------------------------- /roles/template/files/router.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ansible-cloud/aws_demos/HEAD/roles/template/files/router.png -------------------------------------------------------------------------------- /collections/ansible_collections/demo/patching/roles/report_windows_patching/vars/main.yml: -------------------------------------------------------------------------------- 1 | file_path: C:\Inetpub\wwwroot\reports -------------------------------------------------------------------------------- /roles/build_report_s3/vars/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | reports_aws_bucket_name: "aws-cloud-report" 3 | reports_aws_region: "us-west-1" 4 | -------------------------------------------------------------------------------- /roles/build_report_tags/files/aws.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ansible-cloud/aws_demos/HEAD/roles/build_report_tags/files/aws.png -------------------------------------------------------------------------------- /roles/template/files/webpage_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ansible-cloud/aws_demos/HEAD/roles/template/files/webpage_logo.png -------------------------------------------------------------------------------- /collections/ansible_collections/demo/patching/roles/patch_linux/defaults/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | exclude_packages: [] 3 | allow_reboot: true 4 | -------------------------------------------------------------------------------- /roles/build_report_linux/files/aws.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ansible-cloud/aws_demos/HEAD/roles/build_report_linux/files/aws.png -------------------------------------------------------------------------------- /collections/ansible_collections/demo/patching/roles/report_server/vars/Linux.yml: -------------------------------------------------------------------------------- 1 | --- 2 | doc_root: /var/www/html 3 | reports_dir: reports 4 | -------------------------------------------------------------------------------- /roles/build_report_linux/files/router.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ansible-cloud/aws_demos/HEAD/roles/build_report_linux/files/router.png -------------------------------------------------------------------------------- /roles/build_report_tags/files/report.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ansible-cloud/aws_demos/HEAD/roles/build_report_tags/files/report.png -------------------------------------------------------------------------------- /roles/build_report_tags/files/router.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ansible-cloud/aws_demos/HEAD/roles/build_report_tags/files/router.png -------------------------------------------------------------------------------- /collections/ansible_collections/demo/patching/roles/report_server/vars/Win32NT.yml: -------------------------------------------------------------------------------- 1 | --- 2 | doc_root: C:\Inetpub\wwwroot 3 | reports_dir: reports 4 | -------------------------------------------------------------------------------- /roles/build_report_linux/files/webpage_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ansible-cloud/aws_demos/HEAD/roles/build_report_linux/files/webpage_logo.png -------------------------------------------------------------------------------- /roles/build_report_tags/files/webpage_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ansible-cloud/aws_demos/HEAD/roles/build_report_tags/files/webpage_logo.png -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "githubPullRequests.ignoredPullRequestBranches": [ 3 | "master" 4 | ], 5 | "ansible.python.interpreterPath": "/usr/local/bin/python3" 6 | } -------------------------------------------------------------------------------- /collections/ansible_collections/demo/patching/roles/report_linux/files/server.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ansible-cloud/aws_demos/HEAD/collections/ansible_collections/demo/patching/roles/report_linux/files/server.png -------------------------------------------------------------------------------- /collections/ansible_collections/demo/patching/roles/report_linux_patching/defaults/main.yml: -------------------------------------------------------------------------------- 1 | EMAIL_FROM: tower@shadowman.dev 2 | to_emails: alex@shadowman.dev,tower@shadowman.dev 3 | EMAIL_TO: "{{ to_emails.split(',') }}" -------------------------------------------------------------------------------- /collections/ansible_collections/demo/patching/roles/report_server/files/report.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ansible-cloud/aws_demos/HEAD/collections/ansible_collections/demo/patching/roles/report_server/files/report.png -------------------------------------------------------------------------------- /collections/ansible_collections/demo/patching/roles/report_windows_patching/defaults/main.yml: -------------------------------------------------------------------------------- 1 | EMAIL_FROM: tower@shadowman.dev 2 | to_emails: alex@shadowman.dev,tower@shadowman.dev 3 | EMAIL_TO: "{{ to_emails.split(',') }}" -------------------------------------------------------------------------------- /collections/ansible_collections/demo/patching/roles/build_report_windows_patch/defaults/main.yml: -------------------------------------------------------------------------------- 1 | EMAIL_FROM: tower@shadowman.dev 2 | to_emails: alex@shadowman.dev,tower@shadowman.dev 3 | EMAIL_TO: "{{ to_emails.split(',') }}" -------------------------------------------------------------------------------- /collections/ansible_collections/demo/patching/roles/report_windows/files/server.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ansible-cloud/aws_demos/HEAD/collections/ansible_collections/demo/patching/roles/report_windows/files/server.png -------------------------------------------------------------------------------- /collections/ansible_collections/demo/patching/roles/report_linux/files/webpage_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ansible-cloud/aws_demos/HEAD/collections/ansible_collections/demo/patching/roles/report_linux/files/webpage_logo.png -------------------------------------------------------------------------------- /collections/ansible_collections/demo/patching/roles/report_server/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - include_tasks: apache.yml 3 | when: ansible_system == 'Linux' 4 | 5 | - include_tasks: iis.yml 6 | when: ansible_system == 'Win32NT' 7 | -------------------------------------------------------------------------------- /collections/ansible_collections/demo/patching/roles/build_report_network/files/router.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ansible-cloud/aws_demos/HEAD/collections/ansible_collections/demo/patching/roles/build_report_network/files/router.png -------------------------------------------------------------------------------- /collections/ansible_collections/demo/patching/roles/build_report_windows/files/server.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ansible-cloud/aws_demos/HEAD/collections/ansible_collections/demo/patching/roles/build_report_windows/files/server.png -------------------------------------------------------------------------------- /collections/ansible_collections/demo/patching/roles/report_server/files/webpage_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ansible-cloud/aws_demos/HEAD/collections/ansible_collections/demo/patching/roles/report_server/files/webpage_logo.png -------------------------------------------------------------------------------- /collections/ansible_collections/demo/patching/roles/report_windows/files/webpage_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ansible-cloud/aws_demos/HEAD/collections/ansible_collections/demo/patching/roles/report_windows/files/webpage_logo.png -------------------------------------------------------------------------------- /collections/ansible_collections/demo/patching/roles/build_report_network/files/webpage_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ansible-cloud/aws_demos/HEAD/collections/ansible_collections/demo/patching/roles/build_report_network/files/webpage_logo.png -------------------------------------------------------------------------------- /collections/ansible_collections/demo/patching/roles/build_report_windows/files/webpage_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ansible-cloud/aws_demos/HEAD/collections/ansible_collections/demo/patching/roles/build_report_windows/files/webpage_logo.png -------------------------------------------------------------------------------- /collections/ansible_collections/demo/patching/roles/report_linux_patching/files/webpage_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ansible-cloud/aws_demos/HEAD/collections/ansible_collections/demo/patching/roles/report_linux_patching/files/webpage_logo.png -------------------------------------------------------------------------------- /collections/ansible_collections/demo/patching/roles/report_windows_patching/files/webpage_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ansible-cloud/aws_demos/HEAD/collections/ansible_collections/demo/patching/roles/report_windows_patching/files/webpage_logo.png -------------------------------------------------------------------------------- /collections/ansible_collections/demo/patching/roles/build_report_windows_patch/files/webpage_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ansible-cloud/aws_demos/HEAD/collections/ansible_collections/demo/patching/roles/build_report_windows_patch/files/webpage_logo.png -------------------------------------------------------------------------------- /roles/template/README.md: -------------------------------------------------------------------------------- 1 | # network.toolkit.build_report 2 | 3 | To use this multi-platform network automation build_report role: 4 | 5 | ## Task example: 6 | 7 | ``` 8 | - name: build a report 9 | include_role: 10 | name: build_report 11 | ``` 12 | -------------------------------------------------------------------------------- /collections/ansible_collections/demo/patching/roles/report_linux_patching/example_results/Full_Report.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ansible-cloud/aws_demos/HEAD/collections/ansible_collections/demo/patching/roles/report_linux_patching/example_results/Full_Report.png -------------------------------------------------------------------------------- /collections/ansible_collections/demo/patching/roles/report_windows_patching/example_results/Full_Report.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ansible-cloud/aws_demos/HEAD/collections/ansible_collections/demo/patching/roles/report_windows_patching/example_results/Full_Report.png -------------------------------------------------------------------------------- /roles/build_report_s3/README.md: -------------------------------------------------------------------------------- 1 | # network.toolkit.build_report 2 | 3 | To use this multi-platform network automation build_report role: 4 | 5 | ## Task example: 6 | 7 | ``` 8 | - name: build a report 9 | include_role: 10 | name: build_report 11 | ``` 12 | -------------------------------------------------------------------------------- /roles/build_report_linux/README.md: -------------------------------------------------------------------------------- 1 | # network.toolkit.build_report 2 | 3 | To use this multi-platform network automation build_report role: 4 | 5 | ## Task example: 6 | 7 | ``` 8 | - name: build a report 9 | include_role: 10 | name: build_report 11 | ``` 12 | -------------------------------------------------------------------------------- /collections/ansible_collections/demo/patching/roles/build_report_windows_patch/example_results/Full_Report.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ansible-cloud/aws_demos/HEAD/collections/ansible_collections/demo/patching/roles/build_report_windows_patch/example_results/Full_Report.png -------------------------------------------------------------------------------- /collections/ansible_collections/demo/patching/roles/report_linux/example_results/Ansible Linux Automation Report.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ansible-cloud/aws_demos/HEAD/collections/ansible_collections/demo/patching/roles/report_linux/example_results/Ansible Linux Automation Report.png -------------------------------------------------------------------------------- /collections/ansible_collections/demo/patching/roles/report_windows/example_results/Ansible Windows Automation Report.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ansible-cloud/aws_demos/HEAD/collections/ansible_collections/demo/patching/roles/report_windows/example_results/Ansible Windows Automation Report.png -------------------------------------------------------------------------------- /collections/ansible_collections/demo/patching/roles/build_report_network/example_results/Ansible Network Automation Report.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ansible-cloud/aws_demos/HEAD/collections/ansible_collections/demo/patching/roles/build_report_network/example_results/Ansible Network Automation Report.png -------------------------------------------------------------------------------- /collections/ansible_collections/demo/patching/roles/build_report_windows/example_results/Ansible Windows Automation Report.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ansible-cloud/aws_demos/HEAD/collections/ansible_collections/demo/patching/roles/build_report_windows/example_results/Ansible Windows Automation Report.png -------------------------------------------------------------------------------- /collections/ansible_collections/demo/patching/roles/report_linux_patching/example_results/Splunk Patching Aggregated RHEL 8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ansible-cloud/aws_demos/HEAD/collections/ansible_collections/demo/patching/roles/report_linux_patching/example_results/Splunk Patching Aggregated RHEL 8.png -------------------------------------------------------------------------------- /roles/build_report_s3/templates/policy.json: -------------------------------------------------------------------------------- 1 | { 2 | "Version": "2012-10-17", 3 | "Statement": [ 4 | { 5 | "Effect": "Allow", 6 | "Principal": "*", 7 | "Action": "s3:GetObject", 8 | "Resource": "arn:aws:s3:::{{ reports_aws_bucket_name }}/*" 9 | } 10 | ] 11 | } -------------------------------------------------------------------------------- /playbooks/cloud_report_tags.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Create and publish AWS cloud reports 3 | hosts: localhost 4 | connection: local 5 | gather_facts: false 6 | vars: 7 | reports_aws_report: tags 8 | tasks: 9 | - name: Include reports role 10 | ansible.builtin.include_role: 11 | name: "../roles/build_report_tags" 12 | -------------------------------------------------------------------------------- /collections/ansible_collections/demo/patching/roles/patch_windows/defaults/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | win_update_categories: 3 | - Application 4 | - Connectors 5 | - CriticalUpdates 6 | - DefinitionUpdates 7 | - DeveloperKits 8 | - FeaturePacks Guidance 9 | - SecurityUpdates 10 | - ServicePacks 11 | - Tools 12 | - UpdateRollups 13 | - Updates 14 | allow_reboot: true -------------------------------------------------------------------------------- /roles/template/vars/main.yml: -------------------------------------------------------------------------------- 1 | file_path: /var/www/html/ 2 | web_host: ansible-1 3 | web_port: 8088 4 | # multi key, same value lookup for cisco 5 | vendor: 6 | ios: &my_value 'Cisco' 7 | nxos: *my_value 8 | iosxr: *my_value 9 | junos: "Juniper" 10 | eos: "Arista" 11 | transport: 12 | cliconf: "network_cli" 13 | netconf: "netconf" 14 | httpapi: "httpapi" 15 | -------------------------------------------------------------------------------- /roles/build_report_linux/vars/main.yml: -------------------------------------------------------------------------------- 1 | file_path: /var/www/html/ 2 | web_host: ansible-1 3 | web_port: 8088 4 | # multi key, same value lookup for cisco 5 | vendor: 6 | ios: &my_value 'Cisco' 7 | nxos: *my_value 8 | iosxr: *my_value 9 | junos: "Juniper" 10 | eos: "Arista" 11 | transport: 12 | cliconf: "network_cli" 13 | netconf: "netconf" 14 | httpapi: "httpapi" 15 | -------------------------------------------------------------------------------- /roles/build_report_tags/templates/header.j2: -------------------------------------------------------------------------------- 1 |
This report was created by the Ansible Cloud GitHub organization
3 | If you are new to Ansible Automation check out the following links:
4 | 🖱️ Interactive labs for Red Hat Ansible Automation Platform
5 | 🎬 Ansible Official YouTube
6 |
| Platform | 6 |{{hostvars[network_switch]['ansible_net_system']}} | 7 |
| Code Version | 10 |{{hostvars[network_switch]['ansible_net_version']}} | 11 |
| Model | 14 |{{hostvars[network_switch]['ansible_net_model']|default("N/A")}} | 15 |
| Serial Number | 18 |{{hostvars[network_switch]['ansible_net_serialnum']}} | 19 |
| Transport | 22 |{{hostvars[network_switch]['ansible_net_api']}} | 23 |
| Ansible user | 10 |{{ ansible_user_id | default('unknown') }} | 11 |
| Ansible FQDN | 14 |{{ ansible_fqdn | default('unknown') }} | 15 |
| Ansible core version | 18 |{{ ansible_version.full }} | 19 |
| Ansible Python | 22 |{{ ansible_python_version | default('unknown')}} | 23 |
| Host OS | 26 |{{ ansible_distribution | default ("unknown distribution")}} {{ ansible_distribution_version | default ("unknown distro version") }} | 27 |
| Ansible user | 10 |{{ ansible_user_id | default('unknown') }} | 11 |
| Ansible FQDN | 14 |{{ ansible_fqdn | default('unknown') }} | 15 |
| Ansible core version | 18 |{{ ansible_version.full }} | 19 |
| Ansible Python | 22 |{{ ansible_python_version | default('unknown')}} | 23 |
| Host OS | 26 |{{ ansible_distribution | default ("unknown distribution")}} {{ ansible_distribution_version | default ("unknown distro version") }} | 27 |
|
27 |
28 |
30 |
29 | |
31 | 32 | {{ report }} 33 | | 34 | {% endif %} 35 | {% endfor %} 36 |
|
27 |
28 |
30 | |
31 | 32 | {{ page }} 33 | | 34 | {% endfor %} 35 |
Created with
38 | |
27 |
28 |
30 | |
31 | 32 | {{ page }} 33 | | 34 | {% endfor %} 35 |
Created with
38 | There are {{ vpc_info.vpcs | length }} AWS VPCs configured and {{ ec2_instance_info.instances | length }} instances on region {{ ec2_region | default('unknown') }} 8 | 9 |
| {{ '%-38s'|format('VPC name')}} | 13 |{{ '%-28s'|format('VPC id') }} | 14 |{{ '%-14s'|format('instances') }} | 15 |{{ '%-18s'|format('CIDR block') }} | 16 |{{ '%-26s'|format('CIDR block associations') }} | 17 |{{ '%-22s'|format('IGW') }} | 18 ||
|---|---|---|---|---|---|---|
| {{ '%-38s'|format(vpc.tags['Name'] | default('Unspecified, missing name tag')) }} | 22 |{{ '%-28s' | format(vpc.id) }} | 23 |{{ '%-14s'|format(ec2_instance_info.instances | selectattr('vpc_id', 'equalto', vpc.id ) | length) -}} | 24 |{{ '%-18s'|format(vpc.cidr_block) }} | 25 |{{ '%-26s' | format(vpc.cidr_block_association_set | length | default('0')) }} | 26 | {% set ns = namespace(igwfound=False) %} 27 | {%- for igw in igw_info.internet_gateways -%} 28 | {% if igw['attachments'] | length > 0 %} 29 | {% if igw['attachments'][0]['vpc_id'] == vpc.id %} 30 |{{ '%-22s'|format(igw['internet_gateway_id']) }} | 31 | {% set ns.igwfound = True %} 32 | {% endif %} 33 | {% endif %} 34 | {%- endfor -%} 35 | {% if not ns.igwfound %} 36 |{{ '%-22s'|format('No IGW found') }} | 37 | {% endif %} 38 |
| {{ '%-38s'|format('Name')}} | 34 |{{ '%-28s'|format('Instance Id') }} | 35 |{{ '%-14s'|format('Type') }} | 36 |{{ '%-18s'|format('Launch Time') }} | 37 |{{ '%-26s'|format('VPC ID') }} | 38 |{{ '%-22s'|format('Subnet ID') }} | 39 |{{ '%-20s'|format('Tags') }} | 40 |||
|---|---|---|---|---|---|---|---|---|
| {{ '%-38s'|format(vm.tags['Name'] | default('Unspecified, missing name tag')) }} | 44 |{{ '%-28s'|format(vm.instance_id) }} | 45 |{{ '%-14s'|format(vm.instance_type) }} | 46 |{{ '%-18s'|format(vm.launch_time) }} | 47 |{{ '%-26s'|format(vm.vpc_id) }} | 48 |{{ '%-26s'|format(vm.subnet_id) }} | 49 |
50 |
|
59 |
There are {{ value.vpc_info.vpcs | length }} AWS VPCs configured and {{ total }} instances on region {{ key | default('unknown') }}
12 | 13 || VPC name | 17 |VPC id | 18 |instances running |
19 | instances stopped |
20 | CIDR block | 21 |CIDR block associations |
22 | IGW | 23 ||
|---|---|---|---|---|---|---|---|
| {{ vpc.tags['Name'] | default('Unspecified, missing name tag') }} | 27 |{{ vpc.id }} | 28 |{{ value.ec2_instance_info.instances | selectattr('vpc_id', 'equalto', vpc.id ) | selectattr('state.name', 'equalto', "running") | length }} | 29 |{{ value.ec2_instance_info.instances | selectattr('vpc_id', 'equalto', vpc.id ) | selectattr('state.name', 'equalto', "stopped") | length }} | 30 |{{ vpc.cidr_block }} | 31 |{{ vpc.cidr_block_association_set | length | default('0') }} | 32 | {% set ns = namespace(igwfound=False) %} 33 | {% for igw in value.igw_info.internet_gateways %} 34 | {% if igw['attachments'] | length > 0 %} 35 | {% if igw['attachments'][0]['vpc_id'] is defined %} 36 | {% if igw['attachments'][0]['vpc_id'] == vpc.id %} 37 |{{ igw['internet_gateway_id'] }} | 38 | {% set ns.igwfound = True %} 39 | {% endif %} 40 | {% endif %} 41 | {% endif %} 42 | {%- endfor -%} 43 | {% if not ns.igwfound %} 44 |No IGW found | 45 | {% endif %} 46 |
| Public Cloud | 30 |Region | 31 |||||||||
|---|---|---|---|---|---|---|---|---|---|
|
36 |
37 |
40 |
38 | AWS 39 |
41 |
65 |
66 |
67 |
68 |
|
69 |
70 | 71 | {% include 'vpc.j2' %} 72 | | 73 |
Created with
78 | The source code to create this report can be found at https://github.com/ansible-cloud/aws_demos
79 | If you are new to Ansible Automation check out the following links:
80 | Getting Started
81 | Free hands-on workshops
82 | Youtube Videos
83 |
| Public Cloud | 32 |Region | 33 |||||||||
|---|---|---|---|---|---|---|---|---|---|
|
38 |
39 |
42 |
40 | AWS 41 |
43 |
67 |
68 |
69 |
70 |
|
71 |
72 | 73 | {% include 'vpc.j2' %} 74 | | 75 |
Created with
80 | The source code to create this report can be found at https://github.com/ansible-cloud/aws_demos
81 | If you are new to Ansible Automation check out the following links:
82 | Getting Started
83 | Free hands-on workshops
84 | Youtube Videos
85 |
There are {{ value.vpc_info.vpcs | length }} AWS VPCs configured and {{ total }} instances on region {{ key | default('unknown') }}
12 | {% set nsvpc = namespace(total_empty_vpc = 0) %} 13 | {% for vpc in value.vpc_info.vpcs %} 14 | {% set instances_with_vpc = value.ec2_instance_info.instances | selectattr('vpc_id', 'defined') %} 15 | {% if instances_with_vpc | selectattr('vpc_id', 'equalto', vpc.id ) | length <= 0 %} 16 | {% set nsvpc.total_empty_vpc = nsvpc.total_empty_vpc + 1 %} 17 | {% endif %} 18 | {% endfor %} 19 | {% if nsvpc.total_empty_vpc > 0 %} 20 |Optimization Opportunities
22 || VPC name | 30 |VPC id | 31 |instances running |
32 | instances stopped |
33 | CIDR block | 34 |CIDR block associations |
35 | IGW | 36 ||
|---|---|---|---|---|---|---|---|
| {{ vpc.tags['Name'] | default('no name tag') }} | 40 |{{ vpc.id }} | 41 | {% set instances_with_vpc = value.ec2_instance_info.instances | selectattr('vpc_id', 'defined') %} 42 |{{ instances_with_vpc | selectattr('vpc_id', 'equalto', vpc.id ) | selectattr('state.name', 'equalto', "running") | length }} | 43 |{{ instances_with_vpc | selectattr('vpc_id', 'equalto', vpc.id ) | selectattr('state.name', 'equalto', "stopped") | length }} | 44 |{{ vpc.cidr_block }} | 45 |{{ vpc.cidr_block_association_set | length | default('0') }} | 46 | {% set ns = namespace(igwfound=False) %} 47 | {% for igw in value.igw_info.internet_gateways %} 48 | {% if igw['attachments'] | length > 0 %} 49 | {% if igw['attachments'][0]['vpc_id'] is defined %} 50 | {% if igw['attachments'][0]['vpc_id'] == vpc.id %} 51 |{{ igw['internet_gateway_id'] }} | 52 | {% set ns.igwfound = True %} 53 | {% endif %} 54 | {% endif %} 55 | {% endif %} 56 | {%- endfor -%} 57 | {% if not ns.igwfound %} 58 |No IGW found | 59 | {% endif %} 60 |
| Hostname | 25 |Operating System | 26 |Required Updates | 27 |
|---|---|---|
| {{hostvars[windows_host]['inventory_hostname']}} | 33 |{{hostvars[windows_host]['ansible_distribution']|default("none")}} | 34 |
35 |
|
47 |
48 |
Created with Ansible on {{hostvars[inventory_hostname].ansible_date_time.iso8601}}
| Hostname | 25 |Operating System | 26 |Required Updates | 27 |
|---|---|---|
| {{hostvars[windows_host]['inventory_hostname']}} | 33 |{{hostvars[windows_host]['ansible_distribution']|default("none")}} | 34 |
35 |
|
47 |
48 |
Created with Ansible on {{hostvars[host].ansible_date_time.iso8601}}
There are {{ value.vpc_info.vpcs | length }} AWS VPCs configured and {{ total }} instances on region {{ key | default('unknown') }}
24 | {% set nsvpc = namespace(total_empty_vpc = 0) %} 25 | {% for vpc in value.vpc_info.vpcs %} 26 | {% set instances_with_vpc = value.ec2_instance_info.instances | selectattr('vpc_id', 'defined') %} 27 | {% if instances_with_vpc | selectattr('vpc_id', 'equalto', vpc.id ) | length <= 0 %} 28 | {% set nsvpc.total_empty_vpc = nsvpc.total_empty_vpc + 1 %} 29 | {% endif %} 30 | {% endfor %} 31 | {% if nsvpc.total_empty_vpc > 0 %} 32 |Optimization Opportunities
34 || VPC name | 42 |VPC id | 43 |instances running |
44 | instances stopped |
45 | CIDR block | 46 |CIDR block associations |
47 | IGW | 48 ||
|---|---|---|---|---|---|---|---|
| {{ vpc.tags['Name'] | default('no name tag') }} | 52 |{{ vpc.id }} | 53 | {% set instances_with_vpc = value.ec2_instance_info.instances | selectattr('vpc_id', 'defined') %} 54 |{{ instances_with_vpc | selectattr('vpc_id', 'equalto', vpc.id ) | selectattr('state.name', 'equalto', "running") | length }} | 55 |{{ instances_with_vpc | selectattr('vpc_id', 'equalto', vpc.id ) | selectattr('state.name', 'equalto', "stopped") | length }} | 56 |{{ vpc.cidr_block }} | 57 |{{ vpc.cidr_block_association_set | length | default('0') }} | 58 | {% set ns = namespace(igwfound=False) %} 59 | {% for igw in value.igw_info.internet_gateways %} 60 | {% if igw['attachments'] | length > 0 %} 61 | {% if igw['attachments'][0]['vpc_id'] is defined %} 62 | {% if igw['attachments'][0]['vpc_id'] == vpc.id %} 63 |{{ igw['internet_gateway_id'] }} | 64 | {% set ns.igwfound = True %} 65 | {% endif %} 66 | {% endif %} 67 | {% endif %} 68 | {%- endfor -%} 69 | {% if not ns.igwfound %} 70 |No IGW found | 71 | {% endif %} 72 |
| Windows Device | 73 |Operating System | 74 |Operating System Kernel Version | 75 |
|---|---|---|
|
81 |
82 |
85 | {% if detailedreport == 'True' %}
86 | {% include 'packages.j2' %}
87 | {% include 'services.j2' %}
88 | {% endif %}
89 |
83 | |
90 | {{hostvars[windows_host]['ansible_os_family']|default("none")}} | 91 |{{hostvars[windows_host]['ansible_distribution']|default("none")}} | 92 |
Created with
97 | | Network Device | 72 |Layer 1 | 73 |Layer 2 | 74 |Layer 3 | 75 |
|---|---|---|---|
|
81 |
82 |
85 | {% include 'summary.j2' %}
86 |
83 | |
87 | 88 | {% include 'interfaces.j2' %} 89 | | 90 |91 | {% include 'vlans.j2' %} 92 | {% include 'lldp_interfaces.j2' %} 93 | {% include 'l2_interfaces.j2' %} 94 | | 95 |96 | {% include 'l3_interfaces.j2' %} 97 | {% include 'lacp.j2' %} 98 | {% include 'bgp.j2' %} 99 | {% include 'ospf.j2' %} 100 | | 101 | 102 |
Created with
107 | | Windows Device | 73 |Operating System | 74 |Operating System Kernel Version | 75 |
|---|---|---|
|
81 |
82 |
85 | {% if detailedreport == 'True' %}
86 | {% include 'packages.j2' %}
87 | {% include 'services.j2' %}
88 | {% endif %}
89 |
83 | |
90 | {{hostvars[windows_host]['ansible_os_family']|default("none")}} | 91 |{{hostvars[windows_host]['ansible_distribution']|default("none")}} | 92 |
Created with
97 | | Hostname | 25 |Operating System | 26 |Operating System Version | 27 |Required Updates | 28 |
|---|---|---|---|
| {{hostvars[linux_host]['inventory_hostname']}} | 34 |{{hostvars[linux_host]['ansible_os_family']|default("none")}} | 35 |{{hostvars[linux_host]['ansible_distribution_version']|default("none")}} | 36 |
37 |
|
55 |
Created with Ansible on {{hostvars[inventory_hostname].ansible_date_time.iso8601}}
| Linux Device | 73 |Package Manager | 74 |Operating System | 75 |Operating System Version | 76 |Operating System Kernel Version | 77 |
|---|---|---|---|---|
|
83 |
84 |
87 | {% if detailedreport == 'True' %}
88 | {% include 'packages.j2' %}
89 | {% include 'services.j2' %}
90 | {% endif %}
91 |
85 | |
92 | {{hostvars[linux_host]['ansible_pkg_mgr']|default("none")}} | 93 |{{hostvars[linux_host]['ansible_os_family']|default("none")}} | 94 |{{hostvars[linux_host]['ansible_distribution_version']|default("none")}} | 95 |{{hostvars[linux_host]['ansible_kernel']|default("none")}} | 96 |
Created with
101 |