├── meta └── runtime.yml ├── roles ├── build_report_aws │ ├── vars │ │ └── main.yml │ ├── defaults │ │ └── main.yml │ ├── files │ │ ├── aws.png │ │ ├── webpage_logo.png │ │ └── redhat-ansible-logo.svg │ ├── meta │ │ └── main.yml │ ├── templates │ │ ├── header.j2 │ │ ├── ansible.j2 │ │ ├── report.j2 │ │ └── vpc.j2 │ ├── tasks │ │ └── main.yml │ └── README.md ├── build_report_azure │ ├── vars │ │ └── main.yml │ ├── defaults │ │ └── main.yml │ ├── files │ │ ├── azure.png │ │ ├── webpage_logo.png │ │ └── redhat-ansible-logo.svg │ ├── meta │ │ └── main.yml │ ├── templates │ │ ├── header.j2 │ │ ├── ansible.j2 │ │ ├── report.j2 │ │ └── azure.j2 │ ├── README.md │ └── tasks │ │ └── main.yml ├── build_report_certs │ ├── vars │ │ └── main.yml │ ├── files │ │ ├── webpage_logo.png │ │ └── css │ │ │ └── main.css │ ├── example_results │ │ └── Full_Report.png │ ├── defaults │ │ └── main.yml │ ├── meta │ │ └── main.yml │ ├── tasks │ │ └── main.yml │ ├── README.md │ └── templates │ │ └── report.j2 ├── build_report_cloud │ ├── vars │ │ └── main.yml │ ├── defaults │ │ └── main.yml │ ├── .DS_Store │ ├── files │ │ ├── .DS_Store │ │ ├── azure.png │ │ ├── webpage_logo.png │ │ ├── css │ │ │ └── new.css │ │ └── redhat-ansible-logo.svg │ ├── meta │ │ └── main.yml │ ├── templates │ │ ├── header.j2 │ │ ├── vnet.j2 │ │ ├── report.j2 │ │ └── fullreport.j2 │ ├── README.md │ └── tasks │ │ └── main.yml ├── build_report_google │ ├── vars │ │ └── main.yml │ ├── defaults │ │ └── main.yml │ ├── files │ │ ├── gcp.png │ │ ├── webpage_logo.png │ │ └── redhat-ansible-logo.svg │ ├── meta │ │ └── main.yml │ ├── templates │ │ ├── header.j2 │ │ ├── ansible.j2 │ │ ├── gcp.j2 │ │ └── report.j2 │ ├── tasks │ │ └── main.yml │ └── README.md ├── build_report_linux │ ├── vars │ │ └── main.yml │ ├── defaults │ │ └── main.yml │ ├── .DS_Store │ ├── files │ │ ├── .DS_Store │ │ ├── server.png │ │ ├── webpage_logo.png │ │ └── css │ │ │ └── new.css │ ├── example_results │ │ ├── .DS_Store │ │ └── Ansible Linux Automation Report.png │ ├── meta │ │ └── main.yml │ ├── templates │ │ ├── header.j2 │ │ ├── services.j2 │ │ ├── packages.j2 │ │ └── report.j2 │ ├── tasks │ │ └── main.yml │ └── README.md ├── build_report_patch │ ├── vars │ │ └── main.yml │ ├── files │ │ ├── webpage_logo.png │ │ └── css │ │ │ └── main.css │ ├── example_results │ │ └── Full_Report.png │ ├── defaults │ │ └── main.yml │ ├── meta │ │ └── main.yml │ ├── tasks │ │ └── main.yml │ ├── README.md │ └── templates │ │ └── report.j2 ├── build_report_tags │ ├── vars │ │ └── main.yml │ ├── .DS_Store │ ├── defaults │ │ └── main.yml │ ├── meta │ │ └── main.yml │ ├── tasks │ │ └── main.yml │ ├── files │ │ └── css │ │ │ └── main.css │ ├── README.md │ └── templates │ │ └── report.j2 ├── build_report_ad_users │ ├── vars │ │ └── main.yml │ ├── example_results │ │ └── Ansible Active Directory Users Report.png │ ├── meta │ │ └── main.yml │ ├── tasks │ │ └── main.yml │ ├── README.md │ └── templates │ │ └── fullreport.j2 ├── build_report_linux_patch │ ├── vars │ │ └── main.yml │ ├── .DS_Store │ ├── files │ │ ├── webpage_logo.png │ │ └── css │ │ │ └── main.css │ ├── example_results │ │ ├── .DS_Store │ │ ├── Full_Report.png │ │ └── Splunk Patching Aggregated RHEL 8.png │ ├── defaults │ │ └── main.yml │ ├── meta │ │ └── main.yml │ ├── README.md │ ├── tasks │ │ └── main.yml │ └── templates │ │ └── report.j2 ├── build_report_network │ ├── vars │ │ └── main.yml │ ├── .DS_Store │ ├── files │ │ ├── router.png │ │ ├── webpage_logo.png │ │ └── css │ │ │ └── new.css │ ├── example_results │ │ ├── .DS_Store │ │ └── Ansible Network Automation Report.png │ ├── meta │ │ └── main.yml │ ├── templates │ │ ├── header.j2 │ │ ├── summary.j2 │ │ ├── lacp.j2 │ │ ├── bgp_address_family.j2 │ │ ├── vlans.j2 │ │ ├── lldp_interfaces.j2 │ │ ├── static.j2 │ │ ├── bgp.j2 │ │ ├── ospf.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 │ ├── .DS_Store │ ├── files │ │ ├── .DS_Store │ │ ├── server.png │ │ ├── webpage_logo.png │ │ └── css │ │ │ └── new.css │ ├── example_results │ │ ├── .DS_Store │ │ └── Ansible Windows Automation Report.png │ ├── meta │ │ └── main.yml │ ├── templates │ │ ├── header.j2 │ │ ├── packages.j2 │ │ ├── services.j2 │ │ └── report.j2 │ ├── tasks │ │ └── main.yml │ └── README.md └── build_report_windows_patch │ ├── vars │ └── main.yml │ ├── files │ ├── webpage_logo.png │ └── css │ │ └── main.css │ ├── example_results │ └── Full_Report.png │ ├── defaults │ └── main.yml │ ├── meta │ └── main.yml │ ├── README.md │ ├── tasks │ └── main.yml │ └── templates │ └── report.j2 ├── .DS_Store ├── requirements.yml ├── plugins ├── .DS_Store └── modules │ ├── win_scan_packages.py │ ├── win_scan_services.py │ ├── win_scan_services.ps1 │ └── win_scan_packages.ps1 ├── CHANGELOG.rst ├── galaxy.yml ├── docs ├── shadowman.reports.win_scan_packages_module.rst └── shadowman.reports.win_scan_services_module.rst └── README.md /meta/runtime.yml: -------------------------------------------------------------------------------- 1 | --- 2 | requires_ansible: ">=2.9.10" 3 | -------------------------------------------------------------------------------- /roles/build_report_aws/vars/main.yml: -------------------------------------------------------------------------------- 1 | file_path: /var/www/html 2 | -------------------------------------------------------------------------------- /roles/build_report_azure/vars/main.yml: -------------------------------------------------------------------------------- 1 | file_path: /var/www/html 2 | -------------------------------------------------------------------------------- /roles/build_report_certs/vars/main.yml: -------------------------------------------------------------------------------- 1 | file_path: /var/www/html 2 | -------------------------------------------------------------------------------- /roles/build_report_cloud/vars/main.yml: -------------------------------------------------------------------------------- 1 | file_path: /var/www/html 2 | -------------------------------------------------------------------------------- /roles/build_report_google/vars/main.yml: -------------------------------------------------------------------------------- 1 | file_path: /var/www/html 2 | -------------------------------------------------------------------------------- /roles/build_report_linux/vars/main.yml: -------------------------------------------------------------------------------- 1 | file_path: /var/www/html 2 | -------------------------------------------------------------------------------- /roles/build_report_patch/vars/main.yml: -------------------------------------------------------------------------------- 1 | file_path: /var/www/html 2 | -------------------------------------------------------------------------------- /roles/build_report_tags/vars/main.yml: -------------------------------------------------------------------------------- 1 | file_path: /var/www/html 2 | -------------------------------------------------------------------------------- /roles/build_report_ad_users/vars/main.yml: -------------------------------------------------------------------------------- 1 | file_path: /var/www/html 2 | -------------------------------------------------------------------------------- /roles/build_report_linux_patch/vars/main.yml: -------------------------------------------------------------------------------- 1 | file_path: /var/www/html 2 | -------------------------------------------------------------------------------- /roles/build_report_network/vars/main.yml: -------------------------------------------------------------------------------- 1 | file_path: /var/www/html 2 | -------------------------------------------------------------------------------- /roles/build_report_windows/vars/main.yml: -------------------------------------------------------------------------------- 1 | file_path: /var/www/html 2 | -------------------------------------------------------------------------------- /roles/build_report_aws/defaults/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | usesingletemplate: false 3 | -------------------------------------------------------------------------------- /roles/build_report_windows_patch/vars/main.yml: -------------------------------------------------------------------------------- 1 | file_path: /var/www/html 2 | -------------------------------------------------------------------------------- /roles/build_report_azure/defaults/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | usesingletemplate: false 3 | -------------------------------------------------------------------------------- /roles/build_report_cloud/defaults/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | usesingletemplate: false 3 | -------------------------------------------------------------------------------- /roles/build_report_google/defaults/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | usesingletemplate: false 3 | -------------------------------------------------------------------------------- /.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shadowman-lab/shadowman.reports/HEAD/.DS_Store -------------------------------------------------------------------------------- /requirements.yml: -------------------------------------------------------------------------------- 1 | collections: 2 | - name: community.general 3 | version: '>=1.0.0' 4 | -------------------------------------------------------------------------------- /plugins/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shadowman-lab/shadowman.reports/HEAD/plugins/.DS_Store -------------------------------------------------------------------------------- /roles/build_report_linux/defaults/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | detailedreport: "True" 3 | usesingletemplate: false 4 | -------------------------------------------------------------------------------- /roles/build_report_windows/defaults/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | detailedreport: "True" 3 | usesingletemplate: false 4 | -------------------------------------------------------------------------------- /roles/build_report_tags/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shadowman-lab/shadowman.reports/HEAD/roles/build_report_tags/.DS_Store -------------------------------------------------------------------------------- /roles/build_report_cloud/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shadowman-lab/shadowman.reports/HEAD/roles/build_report_cloud/.DS_Store -------------------------------------------------------------------------------- /roles/build_report_linux/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shadowman-lab/shadowman.reports/HEAD/roles/build_report_linux/.DS_Store -------------------------------------------------------------------------------- /roles/build_report_aws/files/aws.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shadowman-lab/shadowman.reports/HEAD/roles/build_report_aws/files/aws.png -------------------------------------------------------------------------------- /roles/build_report_network/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shadowman-lab/shadowman.reports/HEAD/roles/build_report_network/.DS_Store -------------------------------------------------------------------------------- /roles/build_report_windows/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shadowman-lab/shadowman.reports/HEAD/roles/build_report_windows/.DS_Store -------------------------------------------------------------------------------- /roles/build_report_azure/files/azure.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shadowman-lab/shadowman.reports/HEAD/roles/build_report_azure/files/azure.png -------------------------------------------------------------------------------- /roles/build_report_cloud/files/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shadowman-lab/shadowman.reports/HEAD/roles/build_report_cloud/files/.DS_Store -------------------------------------------------------------------------------- /roles/build_report_cloud/files/azure.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shadowman-lab/shadowman.reports/HEAD/roles/build_report_cloud/files/azure.png -------------------------------------------------------------------------------- /roles/build_report_google/files/gcp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shadowman-lab/shadowman.reports/HEAD/roles/build_report_google/files/gcp.png -------------------------------------------------------------------------------- /roles/build_report_linux/files/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shadowman-lab/shadowman.reports/HEAD/roles/build_report_linux/files/.DS_Store -------------------------------------------------------------------------------- /roles/build_report_linux_patch/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shadowman-lab/shadowman.reports/HEAD/roles/build_report_linux_patch/.DS_Store -------------------------------------------------------------------------------- /roles/build_report_linux/files/server.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shadowman-lab/shadowman.reports/HEAD/roles/build_report_linux/files/server.png -------------------------------------------------------------------------------- /roles/build_report_network/files/router.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shadowman-lab/shadowman.reports/HEAD/roles/build_report_network/files/router.png -------------------------------------------------------------------------------- /roles/build_report_windows/files/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shadowman-lab/shadowman.reports/HEAD/roles/build_report_windows/files/.DS_Store -------------------------------------------------------------------------------- /roles/build_report_windows/files/server.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shadowman-lab/shadowman.reports/HEAD/roles/build_report_windows/files/server.png -------------------------------------------------------------------------------- /roles/build_report_aws/files/webpage_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shadowman-lab/shadowman.reports/HEAD/roles/build_report_aws/files/webpage_logo.png -------------------------------------------------------------------------------- /roles/build_report_azure/files/webpage_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shadowman-lab/shadowman.reports/HEAD/roles/build_report_azure/files/webpage_logo.png -------------------------------------------------------------------------------- /roles/build_report_certs/files/webpage_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shadowman-lab/shadowman.reports/HEAD/roles/build_report_certs/files/webpage_logo.png -------------------------------------------------------------------------------- /roles/build_report_cloud/files/webpage_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shadowman-lab/shadowman.reports/HEAD/roles/build_report_cloud/files/webpage_logo.png -------------------------------------------------------------------------------- /roles/build_report_google/files/webpage_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shadowman-lab/shadowman.reports/HEAD/roles/build_report_google/files/webpage_logo.png -------------------------------------------------------------------------------- /roles/build_report_linux/files/webpage_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shadowman-lab/shadowman.reports/HEAD/roles/build_report_linux/files/webpage_logo.png -------------------------------------------------------------------------------- /roles/build_report_patch/files/webpage_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shadowman-lab/shadowman.reports/HEAD/roles/build_report_patch/files/webpage_logo.png -------------------------------------------------------------------------------- /roles/build_report_linux/example_results/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shadowman-lab/shadowman.reports/HEAD/roles/build_report_linux/example_results/.DS_Store -------------------------------------------------------------------------------- /roles/build_report_network/files/webpage_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shadowman-lab/shadowman.reports/HEAD/roles/build_report_network/files/webpage_logo.png -------------------------------------------------------------------------------- /roles/build_report_windows/files/webpage_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shadowman-lab/shadowman.reports/HEAD/roles/build_report_windows/files/webpage_logo.png -------------------------------------------------------------------------------- /roles/build_report_linux_patch/files/webpage_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shadowman-lab/shadowman.reports/HEAD/roles/build_report_linux_patch/files/webpage_logo.png -------------------------------------------------------------------------------- /roles/build_report_network/example_results/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shadowman-lab/shadowman.reports/HEAD/roles/build_report_network/example_results/.DS_Store -------------------------------------------------------------------------------- /roles/build_report_windows/example_results/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shadowman-lab/shadowman.reports/HEAD/roles/build_report_windows/example_results/.DS_Store -------------------------------------------------------------------------------- /roles/build_report_windows_patch/files/webpage_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shadowman-lab/shadowman.reports/HEAD/roles/build_report_windows_patch/files/webpage_logo.png -------------------------------------------------------------------------------- /roles/build_report_certs/example_results/Full_Report.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shadowman-lab/shadowman.reports/HEAD/roles/build_report_certs/example_results/Full_Report.png -------------------------------------------------------------------------------- /roles/build_report_linux_patch/example_results/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shadowman-lab/shadowman.reports/HEAD/roles/build_report_linux_patch/example_results/.DS_Store -------------------------------------------------------------------------------- /roles/build_report_patch/example_results/Full_Report.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shadowman-lab/shadowman.reports/HEAD/roles/build_report_patch/example_results/Full_Report.png -------------------------------------------------------------------------------- /roles/build_report_linux_patch/example_results/Full_Report.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shadowman-lab/shadowman.reports/HEAD/roles/build_report_linux_patch/example_results/Full_Report.png -------------------------------------------------------------------------------- /roles/build_report_windows_patch/example_results/Full_Report.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shadowman-lab/shadowman.reports/HEAD/roles/build_report_windows_patch/example_results/Full_Report.png -------------------------------------------------------------------------------- /roles/build_report_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(',') }}" 4 | sendemailreport: true 5 | -------------------------------------------------------------------------------- /roles/build_report_tags/defaults/main.yml: -------------------------------------------------------------------------------- 1 | email_from: tower@shadowman.dev 2 | to_emails: alex@shadowman.dev,tower@shadowman.dev 3 | email_to: "{{ to_emails.split(',') }}" 4 | sendemailreport: true 5 | -------------------------------------------------------------------------------- /roles/build_report_linux_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(',') }}" 4 | sendemailreport: true 5 | -------------------------------------------------------------------------------- /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(',') }}" 4 | sendemailreport: true 5 | -------------------------------------------------------------------------------- /roles/build_report_linux/example_results/Ansible Linux Automation Report.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shadowman-lab/shadowman.reports/HEAD/roles/build_report_linux/example_results/Ansible Linux Automation Report.png -------------------------------------------------------------------------------- /roles/build_report_network/example_results/Ansible Network Automation Report.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shadowman-lab/shadowman.reports/HEAD/roles/build_report_network/example_results/Ansible Network Automation Report.png -------------------------------------------------------------------------------- /roles/build_report_windows/example_results/Ansible Windows Automation Report.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shadowman-lab/shadowman.reports/HEAD/roles/build_report_windows/example_results/Ansible Windows Automation Report.png -------------------------------------------------------------------------------- /roles/build_report_ad_users/example_results/Ansible Active Directory Users Report.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shadowman-lab/shadowman.reports/HEAD/roles/build_report_ad_users/example_results/Ansible Active Directory Users Report.png -------------------------------------------------------------------------------- /roles/build_report_linux_patch/example_results/Splunk Patching Aggregated RHEL 8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shadowman-lab/shadowman.reports/HEAD/roles/build_report_linux_patch/example_results/Splunk Patching Aggregated RHEL 8.png -------------------------------------------------------------------------------- /roles/build_report_certs/defaults/main.yml: -------------------------------------------------------------------------------- 1 | email_from: tower@shadowman.dev 2 | to_emails: alex@shadowman.dev,tower@shadowman.dev 3 | email_to: "{{ to_emails.split(',') }}" 4 | sendemailreport: true 5 | num_days_to_warn: 60 6 | include_no_cert: 'False' 7 | -------------------------------------------------------------------------------- /roles/build_report_tags/meta/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | galaxy_info: 3 | author: Alex Dworjan 4 | description: Build Tags Report 5 | company: Red Hat, Inc. 6 | license: Apache License 2.0 7 | min_ansible_version: '2.9' 8 | platforms: 9 | - name: Fedora 10 | versions: 11 | - all 12 | - name: EL 13 | versions: 14 | - all 15 | -------------------------------------------------------------------------------- /roles/build_report_cloud/meta/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | galaxy_info: 3 | author: Alex Dworjan 4 | description: Build Cloud Report 5 | company: Red Hat, Inc. 6 | license: Apache License 2.0 7 | min_ansible_version: '2.9' 8 | platforms: 9 | - name: Fedora 10 | versions: 11 | - all 12 | - name: EL 13 | versions: 14 | - all 15 | -------------------------------------------------------------------------------- /roles/build_report_cloud/templates/header.j2: -------------------------------------------------------------------------------- 1 |
2 |
3 | 4 | 10 | 11 |
12 |
-------------------------------------------------------------------------------- /roles/build_report_linux/meta/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | galaxy_info: 3 | author: Alex Dworjan 4 | description: Build Linux Report 5 | company: Red Hat, Inc. 6 | license: Apache License 2.0 7 | min_ansible_version: '2.9' 8 | platforms: 9 | - name: Fedora 10 | versions: 11 | - all 12 | - name: EL 13 | versions: 14 | - all 15 | -------------------------------------------------------------------------------- /roles/build_report_linux/templates/header.j2: -------------------------------------------------------------------------------- 1 |
2 |
3 | 4 | 10 | 11 |
12 |
-------------------------------------------------------------------------------- /roles/build_report_patch/meta/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | galaxy_info: 3 | author: Alex Dworjan 4 | description: Build Patching Report 5 | company: Red Hat, Inc. 6 | license: Apache License 2.0 7 | min_ansible_version: '2.9' 8 | platforms: 9 | - name: Fedora 10 | versions: 11 | - all 12 | - name: EL 13 | versions: 14 | - all 15 | -------------------------------------------------------------------------------- /roles/build_report_windows/meta/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | galaxy_info: 3 | author: Alex Dworjan 4 | description: Build Windows Report 5 | company: Red Hat, Inc. 6 | license: Apache License 2.0 7 | min_ansible_version: '2.9' 8 | platforms: 9 | - name: Fedora 10 | versions: 11 | - all 12 | - name: EL 13 | versions: 14 | - all 15 | -------------------------------------------------------------------------------- /roles/build_report_windows/templates/header.j2: -------------------------------------------------------------------------------- 1 |
2 |
3 | 4 | 10 | 11 |
12 |
-------------------------------------------------------------------------------- /roles/build_report_ad_users/meta/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | galaxy_info: 3 | author: Alex Dworjan 4 | description: Build AD User Report 5 | company: Red Hat, Inc. 6 | license: Apache License 2.0 7 | min_ansible_version: '2.9' 8 | platforms: 9 | - name: Fedora 10 | versions: 11 | - all 12 | - name: EL 13 | versions: 14 | - all 15 | -------------------------------------------------------------------------------- /roles/build_report_aws/meta/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | galaxy_info: 3 | author: Alex Dworjan 4 | description: Build AWS Detailed Report 5 | company: Red Hat, Inc. 6 | license: Apache License 2.0 7 | min_ansible_version: '2.9' 8 | platforms: 9 | - name: Fedora 10 | versions: 11 | - all 12 | - name: EL 13 | versions: 14 | - all 15 | -------------------------------------------------------------------------------- /roles/build_report_azure/meta/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | galaxy_info: 3 | author: Alex Dworjan 4 | description: Build Azure Detailed Report 5 | company: Red Hat, Inc. 6 | license: Apache License 2.0 7 | min_ansible_version: '2.9' 8 | platforms: 9 | - name: Fedora 10 | versions: 11 | - all 12 | - name: EL 13 | versions: 14 | - all 15 | -------------------------------------------------------------------------------- /roles/build_report_certs/meta/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | galaxy_info: 3 | author: Alex Dworjan 4 | description: Build Certificate Report 5 | company: Red Hat, Inc. 6 | license: Apache License 2.0 7 | min_ansible_version: '2.9' 8 | platforms: 9 | - name: Fedora 10 | versions: 11 | - all 12 | - name: EL 13 | versions: 14 | - all 15 | -------------------------------------------------------------------------------- /roles/build_report_network/meta/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | galaxy_info: 3 | author: Alex Dworjan 4 | description: Build Networking Report 5 | company: Red Hat, Inc. 6 | license: Apache License 2.0 7 | min_ansible_version: '2.9' 8 | platforms: 9 | - name: Fedora 10 | versions: 11 | - all 12 | - name: EL 13 | versions: 14 | - all 15 | -------------------------------------------------------------------------------- /roles/build_report_google/meta/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | galaxy_info: 3 | author: Alex Dworjan 4 | description: Build Google Detailed Report 5 | company: Red Hat, Inc. 6 | license: Apache License 2.0 7 | min_ansible_version: '2.9' 8 | platforms: 9 | - name: Fedora 10 | versions: 11 | - all 12 | - name: EL 13 | versions: 14 | - all 15 | -------------------------------------------------------------------------------- /roles/build_report_linux_patch/meta/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | galaxy_info: 3 | author: Alex Dworjan 4 | description: Build Linux Patching Report 5 | company: Red Hat, Inc. 6 | license: Apache License 2.0 7 | min_ansible_version: '2.9' 8 | platforms: 9 | - name: Fedora 10 | versions: 11 | - all 12 | - name: EL 13 | versions: 14 | - all 15 | -------------------------------------------------------------------------------- /roles/build_report_windows_patch/meta/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | galaxy_info: 3 | author: Alex Dworjan 4 | description: Build Windows Patching Report 5 | company: Red Hat, Inc. 6 | license: Apache License 2.0 7 | min_ansible_version: '2.9' 8 | platforms: 9 | - name: Fedora 10 | versions: 11 | - all 12 | - name: EL 13 | versions: 14 | - all 15 | -------------------------------------------------------------------------------- /roles/build_report_aws/templates/header.j2: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 | 5 | 11 | 12 |
13 |
-------------------------------------------------------------------------------- /roles/build_report_azure/templates/header.j2: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 | 5 | 11 | 12 |
13 |
-------------------------------------------------------------------------------- /roles/build_report_google/templates/header.j2: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 | 5 | 11 | 12 |
13 |
-------------------------------------------------------------------------------- /roles/build_report_network/templates/header.j2: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 |
5 |
6 | 7 | 13 | 14 |
15 |
-------------------------------------------------------------------------------- /roles/build_report_ad_users/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Ensure Apache is installed 3 | ansible.builtin.yum: 4 | name: httpd 5 | state: present 6 | 7 | - name: Ensure Apache is started 8 | ansible.builtin.service: 9 | name: httpd 10 | state: started 11 | 12 | - name: Create HTML report 13 | ansible.builtin.template: 14 | src: fullreport.j2 15 | dest: "{{ file_path }}/ad_users.html" 16 | owner: root 17 | group: root 18 | mode: '0644' 19 | vars: 20 | users: "{{ ad_users.stdout | from_json }}" 21 | 22 | - name: Display link to inventory report 23 | ansible.builtin.debug: 24 | msg: "Please go to http://{{ ansible_host }}/ad_users.html" 25 | -------------------------------------------------------------------------------- /roles/build_report_aws/templates/ansible.j2: -------------------------------------------------------------------------------- 1 | 2 |
3 |
4 |

Ansible Automation Info

5 |
6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 |
Ansible core version{{ ansible_version.full }}
Ansible Python{{ ansible_python_version | default('unknown')}}
Host OS{{ ansible_distribution | default ("unknown distribution")}} {{ ansible_distribution_version | default ("unknown distro version") }}
22 |
23 |
24 |
25 | -------------------------------------------------------------------------------- /roles/build_report_azure/templates/ansible.j2: -------------------------------------------------------------------------------- 1 | 2 |
3 |
4 |

Ansible Automation Info

5 |
6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 |
Ansible core version{{ ansible_version.full }}
Ansible Python{{ ansible_python_version | default('unknown')}}
Host OS{{ ansible_distribution | default ("unknown distribution")}} {{ ansible_distribution_version | default ("unknown distro version") }}
22 |
23 |
24 |
25 | -------------------------------------------------------------------------------- /roles/build_report_google/templates/ansible.j2: -------------------------------------------------------------------------------- 1 | 2 |
3 |
4 |

Ansible Automation Info

5 |
6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 |
Ansible core version{{ ansible_version.full }}
Ansible Python{{ ansible_python_version | default('unknown')}}
Host OS{{ ansible_distribution | default ("unknown distribution")}} {{ ansible_distribution_version | default ("unknown distro version") }}
22 |
23 |
24 |
25 | -------------------------------------------------------------------------------- /plugins/modules/win_scan_packages.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | 4 | DOCUMENTATION = ''' 5 | --- 6 | module: win_scan_packages 7 | short_description: Return Package state information as fact data 8 | description: 9 | - Return Package state information as fact data for various Packages 10 | ''' 11 | 12 | EXAMPLES = ''' 13 | - monit: win_scan_packages 14 | # Example fact output: 15 | # host | success >> { 16 | # "ansible_facts": { 17 | # "packages": [ 18 | { 19 | "name": "Mozilla Firefox 76.0.1 (x64 en-US)", 20 | "version": "76.0.1", 21 | "publisher": "Mozilla", 22 | "arch": "Win64" 23 | }, 24 | { 25 | "name": "Mozilla Maintenance Service", 26 | "version": "76.0.1", 27 | "publisher": "Mozilla", 28 | "arch": "Win64" 29 | }, 30 | # } 31 | ''' -------------------------------------------------------------------------------- /roles/build_report_network/templates/summary.j2: -------------------------------------------------------------------------------- 1 |
2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 |
Platform{{hostvars[network_switch]['ansible_net_system']| default("N/A")}}
Code Version{{hostvars[network_switch]['ansible_net_version']| default("N/A")}}
Model{{hostvars[network_switch]['ansible_net_model']|default("N/A")}}
Serial Number{{hostvars[network_switch]['ansible_net_serialnum']| default("N/A")}}
Transport{{hostvars[network_switch]['ansible_net_api']| default("N/A")}}
25 |
26 | -------------------------------------------------------------------------------- /plugins/modules/win_scan_services.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | 4 | DOCUMENTATION = ''' 5 | --- 6 | module: win_scan_services 7 | short_description: Return service state information as fact data 8 | description: 9 | - Return service state information as fact data for various service management utilities 10 | ''' 11 | 12 | EXAMPLES = ''' 13 | - monit: win_scan_services 14 | # Example fact output: 15 | # host | success >> { 16 | # "ansible_facts": { 17 | # "services": [ 18 | { 19 | "name": "AllJoyn Router Service", 20 | "win_svc_name": "AJRouter", 21 | "state": "stopped" 22 | }, 23 | { 24 | "name": "Application Layer Gateway Service", 25 | "win_svc_name": "ALG", 26 | "state": "stopped" 27 | }, 28 | { 29 | "name": "Application Host Helper Service", 30 | "win_svc_name": "AppHostSvc", 31 | "state": "running" 32 | }, 33 | # } 34 | ''' -------------------------------------------------------------------------------- /roles/build_report_network/tasks/main.yml: -------------------------------------------------------------------------------- 1 | - name: Ensure Apache is installed 2 | ansible.builtin.yum: 3 | name: httpd 4 | state: present 5 | 6 | - name: Ensure Apache is started 7 | ansible.builtin.service: 8 | name: httpd 9 | state: started 10 | 11 | - name: Create HTML report 12 | ansible.builtin.template: 13 | src: report.j2 14 | dest: "{{ file_path }}/network.html" 15 | owner: root 16 | group: root 17 | mode: '0644' 18 | 19 | - name: Copy CSS over 20 | ansible.builtin.copy: 21 | src: "css" 22 | dest: "{{ file_path }}" 23 | directory_mode: true 24 | owner: root 25 | group: root 26 | mode: '0644' 27 | 28 | - name: Copy logos over 29 | ansible.builtin.copy: 30 | src: "{{ item }}" 31 | dest: "{{ file_path }}" 32 | directory_mode: true 33 | owner: root 34 | group: root 35 | mode: '0644' 36 | loop: 37 | - "webpage_logo.png" 38 | - "redhat-ansible-logo.svg" 39 | - "router.png" 40 | 41 | - name: Display link to inventory report 42 | ansible.builtin.debug: 43 | msg: "Please go to http://{{ ansible_host }}/network.html" 44 | -------------------------------------------------------------------------------- /roles/build_report_windows_patch/README.md: -------------------------------------------------------------------------------- 1 | build_report_windows_patch 2 | ======== 3 | 4 | Installs Apache and creates a report based on facts from Windows update job 5 | 6 | Requirements 7 | ------------ 8 | 9 | Must run on Apache server on RHEL 10 | 11 | Role Variables / Configuration 12 | -------------- 13 | 14 | Set patching results to patchresult variable. Set var sendemailreport to false if not also sending the report via e-mail 15 | 16 | Dependencies 17 | ------------ 18 | 19 | N/A 20 | 21 | Example Playbook 22 | ---------------- 23 | 24 | The role can be used to create an html patching report on a Linux host using any number of Windows servers 25 | 26 | 27 | ``` 28 | --- 29 | - name: Windows patching playbook 30 | hosts: all 31 | 32 | tasks: 33 | 34 | - name: Install Windows Updates 35 | ansible.windows.win_updates: 36 | category_names: '*' 37 | reboot: yes 38 | register: patchresult 39 | 40 | - name: Build the report 41 | ansible.builtin.include_role: 42 | name: shadowman.reports.build_report_windows_patch 43 | apply: 44 | delegate_to: report.shadowman.dev 45 | run_once: true 46 | 47 | ``` 48 | -------------------------------------------------------------------------------- /plugins/modules/win_scan_services.ps1: -------------------------------------------------------------------------------- 1 | #!powershell 2 | # This file is part of Ansible 3 | # 4 | # Ansible is free software: you can redistribute it and/or modify 5 | # it under the terms of the GNU General Public License as published by 6 | # the Free Software Foundation, either version 3 of the License, or 7 | # (at your option) any later version. 8 | # 9 | # Ansible is distributed in the hope that it will be useful, 10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | # GNU General Public License for more details. 13 | # 14 | # You should have received a copy of the GNU General Public License 15 | # along with Ansible. If not, see . 16 | 17 | # WANT_JSON 18 | # POWERSHELL_COMMON 19 | 20 | $result = New-Object psobject @{ 21 | ansible_facts = New-Object psobject @{ 22 | services = Get-Service | 23 | Select-Object -Property @{Name="name"; Expression={$_."DisplayName"}}, 24 | @{Name="win_svc_name"; Expression={$_."Name"}}, 25 | @{Name="state"; Expression={$_."Status".ToString().ToLower()}} 26 | } 27 | changed = $false 28 | } 29 | 30 | Exit-Json $result; -------------------------------------------------------------------------------- /CHANGELOG.rst: -------------------------------------------------------------------------------- 1 | Shadowman Report Changes by Release 2 | ================================= 3 | 4 | 1.9.1 - Released 18-Nov-2024 5 | ---------------------------- 6 | 7 | Changes 8 | ``````` 9 | - Changed default var of detailedreport in Linux and Windows report to be a String 10 | 11 | 1.9.0 - Released 9-Jul-2024 12 | ---------------------------- 13 | 14 | Changes 15 | ``````` 16 | - Added Active Directory Report 17 | 18 | 1.8.0 - Released 10-Jun-2024 19 | ---------------------------- 20 | 21 | Changes 22 | ``````` 23 | - Added Google Cloud report 24 | 25 | 1.7.1 - Released 13-Dec-2023 26 | ---------------------------- 27 | 28 | Changes 29 | ``````` 30 | - Added aws ability to tags report 31 | 32 | 1.7.0 - Released 13-Dec-2023 33 | ---------------------------- 34 | 35 | Changes 36 | ``````` 37 | - Added aws report which has detailed AWS information across all regions 38 | 39 | 1.6.0 - Released 04-May-2023 40 | ---------------------------- 41 | 42 | Changes 43 | ``````` 44 | - Added azure report which has detailed Azure information across all regions 45 | 46 | 1.5.0 - Released 18-Apr-2023 47 | ---------------------------- 48 | 49 | Changes 50 | ``````` 51 | - Added certificate report 52 | 53 | 1.3.0 - Released 27-May-2022 54 | ---------------------------- 55 | 56 | Changes 57 | ``````` 58 | - Fixed error with no changelog 59 | -------------------------------------------------------------------------------- /roles/build_report_windows/templates/packages.j2: -------------------------------------------------------------------------------- 1 | 2 |
3 |
4 | 5 | 27 |
28 |
29 | -------------------------------------------------------------------------------- /roles/build_report_windows/templates/services.j2: -------------------------------------------------------------------------------- 1 | 2 |
3 |
4 | 5 | 27 |
28 |
29 | -------------------------------------------------------------------------------- /roles/build_report_tags/tasks/main.yml: -------------------------------------------------------------------------------- 1 | - name: Ensure Apache is installed 2 | ansible.builtin.yum: 3 | name: httpd 4 | state: present 5 | 6 | - name: Ensure Apache is started 7 | ansible.builtin.service: 8 | name: httpd 9 | state: started 10 | 11 | - name: Create HTML report 12 | ansible.builtin.template: 13 | src: report.j2 14 | dest: "{{ file_path }}/tags.html" 15 | owner: root 16 | group: root 17 | mode: '0644' 18 | check_mode: false 19 | 20 | - name: Copy CSS over 21 | ansible.builtin.copy: 22 | src: "css" 23 | dest: "{{ file_path }}" 24 | directory_mode: true 25 | owner: root 26 | group: root 27 | mode: '0644' 28 | check_mode: false 29 | 30 | - name: Display link to Linux patch report 31 | ansible.builtin.debug: 32 | msg: "Please go to http://{{ ansible_host }}/tags.html" 33 | 34 | - name: Send Report via E-mail 35 | community.general.mail: 36 | host: "{{ EMAIL_HOST }}" 37 | username: "{{ EMAIL_USERNAME }}" 38 | password: "{{ EMAIL_PASSWORD }}" 39 | port: "{{ EMAIL_PORT }}" 40 | subject: "Tags Report" 41 | body: "{{ lookup('template', 'report.j2') }}" 42 | from: "{{ email_from }}" 43 | to: "{{ email_to }}" 44 | subtype: html 45 | delegate_to: localhost 46 | become: false 47 | check_mode: false 48 | when: sendemailreport 49 | -------------------------------------------------------------------------------- /roles/build_report_certs/tasks/main.yml: -------------------------------------------------------------------------------- 1 | - name: Ensure Apache is installed 2 | ansible.builtin.yum: 3 | name: httpd 4 | state: present 5 | 6 | - name: Ensure Apache is started 7 | ansible.builtin.service: 8 | name: httpd 9 | state: started 10 | 11 | - name: Create HTML report 12 | ansible.builtin.template: 13 | src: report.j2 14 | dest: "{{ file_path }}/cert.html" 15 | owner: root 16 | group: root 17 | mode: '0644' 18 | check_mode: false 19 | 20 | - name: Copy CSS over 21 | ansible.builtin.copy: 22 | src: "css" 23 | dest: "{{ file_path }}" 24 | directory_mode: true 25 | owner: root 26 | group: root 27 | mode: '0644' 28 | check_mode: false 29 | 30 | - name: Display link to Linux patch report 31 | ansible.builtin.debug: 32 | msg: "Please go to http://{{ ansible_host }}/cert.html" 33 | 34 | - name: Send Report via E-mail 35 | community.general.mail: 36 | host: "{{ EMAIL_HOST }}" 37 | username: "{{ EMAIL_USERNAME }}" 38 | password: "{{ EMAIL_PASSWORD }}" 39 | port: "{{ EMAIL_PORT }}" 40 | subject: "Certificate Report" 41 | body: "{{ lookup('template', 'report.j2') }}" 42 | from: "{{ email_from }}" 43 | to: "{{ email_to }}" 44 | subtype: html 45 | delegate_to: localhost 46 | become: false 47 | check_mode: false 48 | when: sendemailreport 49 | -------------------------------------------------------------------------------- /roles/build_report_cloud/README.md: -------------------------------------------------------------------------------- 1 | build_report_cloud 2 | ======== 3 | 4 | Installs Apache and creates a report based on facts from Azure. 5 | 6 | Requirements 7 | ------------ 8 | 9 | Must deploy to Apache server 10 | 11 | Role Variables / Configuration 12 | -------------- 13 | 14 | N/A 15 | 16 | Dependencies 17 | ------------ 18 | 19 | N/A 20 | 21 | Example Playbook 22 | ---------------- 23 | 24 | The role can be used to create an html report on Azure statistics onto an apache server. 25 | 26 | 27 | ``` 28 | --- 29 | - name: Create Cloud Report 30 | hosts: all 31 | tasks: 32 | 33 | - name: Retrieve VNet information 34 | azure.azcollection.azure_rm_virtualnetwork_info: 35 | register: vnet_info 36 | 37 | - name: Retrieve Network Interface information 38 | azure.azcollection.azure_rm_networkinterface_info: 39 | register: interface_info 40 | 41 | - name: Set Azure information 42 | ansible.builtin.set_fact: 43 | azure_sub_id: "{{ lookup('ansible.builtin.env', 'AZURE_SUBSCRIPTION_ID') }}" 44 | azure_client: "{{ lookup('ansible.builtin.env', 'AZURE_CLIENT_ID') }}" 45 | 46 | - name: Build the report 47 | ansible.builtin.include_role: 48 | name: shadowman.reports.build_report_cloud 49 | apply: 50 | delegate_to: report.shadowman.dev 51 | run_once: true 52 | ``` 53 | -------------------------------------------------------------------------------- /roles/build_report_linux/templates/services.j2: -------------------------------------------------------------------------------- 1 | 2 |
3 |
4 | 5 | 28 |
29 |
30 | -------------------------------------------------------------------------------- /roles/build_report_azure/README.md: -------------------------------------------------------------------------------- 1 | build_report_azure 2 | ======== 3 | 4 | Installs Apache and creates a report based on facts from Azure. 5 | 6 | Requirements 7 | ------------ 8 | 9 | Must deploy to Apache server 10 | 11 | Role Variables / Configuration 12 | -------------- 13 | 14 | N/A 15 | 16 | Dependencies 17 | ------------ 18 | 19 | N/A 20 | 21 | Example Playbook 22 | ---------------- 23 | 24 | The role can be used to create an html report on Azure statistics onto an apache server. 25 | 26 | 27 | ``` 28 | --- 29 | - name: Create Cloud Report 30 | hosts: localhost 31 | tasks: 32 | 33 | - name: Get list of all regions 34 | azure.azcollection.azure_rm_resource_info: 35 | url: "/locations" 36 | api_version: "2020-01-01" 37 | register: all_regions 38 | 39 | - name: Get all networks 40 | azure.azcollection.azure_rm_virtualnetwork_info: 41 | register: azure_networks 42 | 43 | - name: Get all vms 44 | azure.azcollection.azure_rm_virtualmachine_info: 45 | register: azure_vms 46 | 47 | - name: Get facts for network interfaces 48 | azure.azcollection.azure_rm_networkinterface_info: 49 | register: network_interfaces 50 | 51 | - name: Build the report 52 | ansible.builtin.include_role: 53 | name: shadowman.reports.build_report_azure 54 | apply: 55 | delegate_to: report.shadowman.dev 56 | run_once: true 57 | ``` 58 | -------------------------------------------------------------------------------- /roles/build_report_cloud/tasks/main.yml: -------------------------------------------------------------------------------- 1 | - name: Ensure Apache is installed 2 | ansible.builtin.yum: 3 | name: httpd 4 | state: present 5 | 6 | - name: Ensure Apache is started 7 | ansible.builtin.service: 8 | name: httpd 9 | state: started 10 | 11 | - name: Create HTML report if jinja include works 12 | ansible.builtin.template: 13 | src: report.j2 14 | dest: "{{ file_path }}/cloud.html" 15 | owner: root 16 | group: root 17 | mode: '0644' 18 | when: not usesingletemplate 19 | 20 | - name: Create HTML report if jinja include doesn't work 21 | ansible.builtin.template: 22 | src: fullreport.j2 23 | dest: "{{ file_path }}/cloud.html" 24 | owner: root 25 | group: root 26 | mode: '0644' 27 | when: usesingletemplate 28 | 29 | - name: Copy CSS over 30 | ansible.builtin.copy: 31 | src: "css" 32 | dest: "{{ file_path }}" 33 | directory_mode: true 34 | owner: root 35 | group: root 36 | mode: '0644' 37 | 38 | - name: Copy logos over 39 | ansible.builtin.copy: 40 | src: "{{ item }}" 41 | dest: "{{ file_path }}" 42 | directory_mode: true 43 | owner: root 44 | group: root 45 | mode: '0644' 46 | loop: 47 | - "webpage_logo.png" 48 | - "redhat-ansible-logo.svg" 49 | - "azure.png" 50 | 51 | - name: Display link to inventory report 52 | ansible.builtin.debug: 53 | msg: "Please go to http://{{ ansible_host }}/cloud.html" 54 | -------------------------------------------------------------------------------- /roles/build_report_linux/tasks/main.yml: -------------------------------------------------------------------------------- 1 | - name: Ensure Apache is installed 2 | ansible.builtin.yum: 3 | name: httpd 4 | state: present 5 | 6 | - name: Ensure Apache is started 7 | ansible.builtin.service: 8 | name: httpd 9 | state: started 10 | 11 | - name: Create HTML report if jinja include works 12 | ansible.builtin.template: 13 | src: report.j2 14 | dest: "{{ file_path }}/linux.html" 15 | owner: root 16 | group: root 17 | mode: '0644' 18 | when: not usesingletemplate 19 | 20 | - name: Create HTML report if jinja include doesn't work 21 | ansible.builtin.template: 22 | src: fullreport.j2 23 | dest: "{{ file_path }}/linux.html" 24 | owner: root 25 | group: root 26 | mode: '0644' 27 | when: usesingletemplate 28 | 29 | - name: Copy CSS over 30 | ansible.builtin.copy: 31 | src: "css" 32 | dest: "{{ file_path }}" 33 | directory_mode: true 34 | owner: root 35 | group: root 36 | mode: '0644' 37 | 38 | - name: Copy logos over 39 | ansible.builtin.copy: 40 | src: "{{ item }}" 41 | dest: "{{ file_path }}" 42 | directory_mode: true 43 | owner: root 44 | group: root 45 | mode: '0644' 46 | loop: 47 | - "webpage_logo.png" 48 | - "redhat-ansible-logo.svg" 49 | - "server.png" 50 | 51 | - name: Display link to inventory report 52 | ansible.builtin.debug: 53 | msg: "Please go to http://{{ ansible_host }}/linux.html" 54 | -------------------------------------------------------------------------------- /roles/build_report_linux/templates/packages.j2: -------------------------------------------------------------------------------- 1 | 2 |
3 |
4 | 5 | 29 |
30 |
31 | -------------------------------------------------------------------------------- /roles/build_report_windows/tasks/main.yml: -------------------------------------------------------------------------------- 1 | - name: Ensure Apache is installed 2 | ansible.builtin.yum: 3 | name: httpd 4 | state: present 5 | 6 | - name: Ensure Apache is started 7 | ansible.builtin.service: 8 | name: httpd 9 | state: started 10 | 11 | - name: Create HTML report if jinja include works 12 | ansible.builtin.template: 13 | src: report.j2 14 | dest: "{{ file_path }}/windows.html" 15 | owner: root 16 | group: root 17 | mode: '0644' 18 | when: not usesingletemplate 19 | 20 | - name: Create HTML report if jinja include doesn't work 21 | ansible.builtin.template: 22 | src: fullreport.j2 23 | dest: "{{ file_path }}/windows.html" 24 | owner: root 25 | group: root 26 | mode: '0644' 27 | when: usesingletemplate 28 | 29 | - name: Copy CSS over 30 | ansible.builtin.copy: 31 | src: "css" 32 | dest: "{{ file_path }}" 33 | directory_mode: true 34 | owner: root 35 | group: root 36 | mode: '0644' 37 | 38 | - name: Copy logos over 39 | ansible.builtin.copy: 40 | src: "{{ item }}" 41 | dest: "{{ file_path }}" 42 | directory_mode: true 43 | owner: root 44 | group: root 45 | mode: '0644' 46 | loop: 47 | - "webpage_logo.png" 48 | - "redhat-ansible-logo.svg" 49 | - "server.png" 50 | 51 | - name: Display link to inventory report 52 | ansible.builtin.debug: 53 | msg: "Please go to http://{{ ansible_host }}/windows.html" 54 | -------------------------------------------------------------------------------- /roles/build_report_azure/tasks/main.yml: -------------------------------------------------------------------------------- 1 | - name: Ensure Apache is installed 2 | ansible.builtin.yum: 3 | name: httpd 4 | state: present 5 | 6 | - name: Ensure Apache is started 7 | ansible.builtin.service: 8 | name: httpd 9 | state: started 10 | 11 | - name: Create HTML report if jinja include works 12 | ansible.builtin.template: 13 | src: report.j2 14 | dest: "{{ file_path }}/clouddetailed.html" 15 | owner: root 16 | group: root 17 | mode: '0644' 18 | when: not usesingletemplate 19 | 20 | - name: Create HTML report if jinja include doesn't work 21 | ansible.builtin.template: 22 | src: fullreport.j2 23 | dest: "{{ file_path }}/clouddetailed.html" 24 | owner: root 25 | group: root 26 | mode: '0644' 27 | when: usesingletemplate 28 | 29 | - name: Copy CSS over 30 | ansible.builtin.copy: 31 | src: "css" 32 | dest: "{{ file_path }}" 33 | directory_mode: true 34 | owner: root 35 | group: root 36 | mode: '0644' 37 | 38 | - name: Copy logos over 39 | ansible.builtin.copy: 40 | src: "{{ item }}" 41 | dest: "{{ file_path }}" 42 | directory_mode: true 43 | owner: root 44 | group: root 45 | mode: '0644' 46 | loop: 47 | - "webpage_logo.png" 48 | - "redhat-ansible-logo.svg" 49 | - "azure.png" 50 | 51 | - name: Display link to inventory report 52 | ansible.builtin.debug: 53 | msg: "Please go to http://{{ ansible_host }}/clouddetailed.html" 54 | -------------------------------------------------------------------------------- /roles/build_report_aws/tasks/main.yml: -------------------------------------------------------------------------------- 1 | - name: Ensure Apache is installed 2 | ansible.builtin.yum: 3 | name: httpd 4 | state: present 5 | 6 | - name: Ensure Apache is started 7 | ansible.builtin.service: 8 | name: httpd 9 | state: started 10 | 11 | - name: Create HTML report if jinja include works 12 | ansible.builtin.template: 13 | src: report.j2 14 | dest: "{{ file_path }}/cloudawsdetailed.html" 15 | owner: root 16 | group: root 17 | mode: '0644' 18 | when: not usesingletemplate 19 | 20 | - name: Create HTML report if jinja include doesn't work 21 | ansible.builtin.template: 22 | src: fullreport.j2 23 | dest: "{{ file_path }}/cloudawsdetailed.html" 24 | owner: root 25 | group: root 26 | mode: '0644' 27 | when: usesingletemplate 28 | 29 | - name: Copy CSS over 30 | ansible.builtin.copy: 31 | src: "css" 32 | dest: "{{ file_path }}" 33 | directory_mode: true 34 | owner: root 35 | group: root 36 | mode: '0644' 37 | 38 | - name: Copy logos over 39 | ansible.builtin.copy: 40 | src: "{{ item }}" 41 | dest: "{{ file_path }}" 42 | directory_mode: true 43 | owner: root 44 | group: root 45 | mode: '0644' 46 | loop: 47 | - "webpage_logo.png" 48 | - "redhat-ansible-logo.svg" 49 | - "aws.png" 50 | 51 | - name: Display link to inventory report 52 | ansible.builtin.debug: 53 | msg: "Please go to http://{{ ansible_host }}/cloudawsdetailed.html" 54 | -------------------------------------------------------------------------------- /roles/build_report_cloud/templates/vnet.j2: -------------------------------------------------------------------------------- 1 | 2 |
3 |
4 |

{{ azure_sub_id | default('unknown') }}

5 |
6 |

There are {{ vnet_info.virtualnetworks | length }} Azure VNets configured and {{ interface_info.networkinterfaces | length }} network interfaces

7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | {% for vnet in vnet_info.virtualnetworks %} 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | {% endfor %} 26 | 27 |
{{ '%-38s'|format('VNet Name')}}{{ '%-28s'|format('VNet ID') }}{{ '%-14s'|format('Network Interfaces') }}{{ '%-18s'|format('Address Prefixes') }}{{ '%-26s'|format('Subnets') }}
{{ '%-38s'|format(vnet.name | default('none')) }}{{ '%-28s' | format(vnet.id | default('none')) }}{{ '%-14s'|format(interface_info.networkinterfaces | selectattr('virtual_network.name', 'equalto', vnet.name ) | length | default('0')) -}}{{ '%-18s'|format(vnet.address_prefixes | join(',') | default('none')) }}{{ '%-26s' | format(vnet.subnets | length | default('0')) }}
28 |
29 |
30 |
31 | -------------------------------------------------------------------------------- /roles/build_report_google/tasks/main.yml: -------------------------------------------------------------------------------- 1 | - name: Ensure Apache is installed 2 | ansible.builtin.yum: 3 | name: httpd 4 | state: present 5 | 6 | - name: Ensure Apache is started 7 | ansible.builtin.service: 8 | name: httpd 9 | state: started 10 | 11 | - name: Create HTML report if jinja include works 12 | ansible.builtin.template: 13 | src: report.j2 14 | dest: "{{ file_path }}/cloudgoogledetailed.html" 15 | owner: root 16 | group: root 17 | mode: '0644' 18 | when: not usesingletemplate 19 | 20 | - name: Create HTML report if jinja include doesn't work 21 | ansible.builtin.template: 22 | src: fullreport.j2 23 | dest: "{{ file_path }}/cloudgoogledetailed.html" 24 | owner: root 25 | group: root 26 | mode: '0644' 27 | when: usesingletemplate 28 | 29 | - name: Copy CSS over 30 | ansible.builtin.copy: 31 | src: "css" 32 | dest: "{{ file_path }}" 33 | directory_mode: true 34 | owner: root 35 | group: root 36 | mode: '0644' 37 | 38 | - name: Copy logos over 39 | ansible.builtin.copy: 40 | src: "{{ item }}" 41 | dest: "{{ file_path }}" 42 | directory_mode: true 43 | owner: root 44 | group: root 45 | mode: '0644' 46 | loop: 47 | - "webpage_logo.png" 48 | - "redhat-ansible-logo.svg" 49 | - "gcp.png" 50 | 51 | - name: Display link to inventory report 52 | ansible.builtin.debug: 53 | msg: "Please go to http://{{ ansible_host }}/cloudgoogledetailed.html" 54 | -------------------------------------------------------------------------------- /roles/build_report_network/README.md: -------------------------------------------------------------------------------- 1 | build_report_network 2 | ======== 3 | 4 | Installs Apache and creates a report based on facts from network devices. Use in combination with facts modules for different Networking devices. 5 | 6 | Requirements 7 | ------------ 8 | 9 | Must run on Apache server 10 | 11 | Role Variables / Configuration 12 | -------------- 13 | 14 | N/A 15 | 16 | Dependencies 17 | ------------ 18 | 19 | N/A 20 | 21 | Example Playbook 22 | ---------------- 23 | 24 | The role can be used to create an html report on any number of Linux hosts using any number of network devices 25 | 26 | 27 | ``` 28 | --- 29 | - name: Build Networking Device Report 30 | hosts: all 31 | gather_facts: false 32 | 33 | tasks: 34 | 35 | - name: Grab Arista eos facts 36 | arista.eos.eos_facts: 37 | gather_subset: 'min' 38 | gather_network_resources: all 39 | register: eosfacts 40 | 41 | - name: Grab Cisco ios facts 42 | cisco.ios.ios_facts: 43 | gather_subset: 'min' 44 | gather_network_resources: all 45 | register: iosfacts 46 | 47 | - name: Grab vyos facts 48 | vyos.vyos.vyos_facts: 49 | gather_subset: 'min' 50 | gather_network_resources: all 51 | register: vyosfacts 52 | 53 | - name: Build the report 54 | ansible.builtin.include_role: 55 | name: shadowman.reports.build_report_network 56 | apply: 57 | delegate_to: report.shadowman.dev 58 | run_once: true 59 | 60 | ``` 61 | -------------------------------------------------------------------------------- /roles/build_report_windows/README.md: -------------------------------------------------------------------------------- 1 | build_report_windows 2 | ======== 3 | 4 | Installs Apache and creates a report based on facts from Windows services and packages modules. Utilize var "detailedreport=false" if you do not need packages or services information. Use in combination with win_scan_packages and win_scan_services modules included in the collection 5 | 6 | 7 | Requirements 8 | ------------ 9 | 10 | Must run on Apache server 11 | 12 | Role Variables / Configuration 13 | -------------- 14 | 15 | N/A 16 | 17 | Dependencies 18 | ------------ 19 | 20 | N/A 21 | 22 | Example Playbook 23 | ---------------- 24 | 25 | The role can be used to create an html report on any number of Linux hosts using any number of Windows servers about their services and packages installed. Added in a boolean var usesingletemplate if running into issues with jinja not adding in the package/services facts. 26 | 27 | 28 | ``` 29 | --- 30 | - name: Create Windows Report 31 | hosts: all 32 | tasks: 33 | 34 | - name: "Scan packages (Windows)" 35 | shadowman.reports.win_scan_packages: 36 | when: ansible_os_family == "Windows" 37 | 38 | - name: "Scan services (Windows)" 39 | shadowman.reports.win_scan_services: 40 | when: ansible_os_family == "Windows" 41 | 42 | - name: Build the report 43 | ansible.builtin.include_role: 44 | name: shadowman.reports.build_report_windows 45 | apply: 46 | delegate_to: report.shadowman.dev 47 | run_once: true 48 | 49 | ``` 50 | -------------------------------------------------------------------------------- /roles/build_report_linux_patch/README.md: -------------------------------------------------------------------------------- 1 | build_report_linux_patch 2 | ======== 3 | 4 | Installs Apache and creates a report based on facts from RHEL patching. Could be expanded for patching other Linux distros but would require reviewing json output 5 | 6 | Requirements 7 | ------------ 8 | 9 | Must run on Apache server 10 | 11 | Role Variables / Configuration 12 | -------------- 13 | 14 | Must register yum results as patchingresult and dnf results as patchingresultdnf. Set var sendemailreport to false if not also sending the report via e-mail 15 | 16 | Dependencies 17 | ------------ 18 | 19 | N/A 20 | 21 | Example Playbook 22 | ---------------- 23 | 24 | The role can be used to create an html report on any number of RHEL hosts using any number of RHEL servers about their patching results(yum and dnf) 25 | 26 | 27 | ``` 28 | --- 29 | - name: Patch RHEL Servers 30 | hosts: all 31 | 32 | tasks: 33 | 34 | - name: upgrade all packages (yum) 35 | ansible.builtin.yum: 36 | name: '*' 37 | state: latest 38 | when: ansible_pkg_mgr == "yum" 39 | register: patchingresult 40 | 41 | - name: upgrade all packages (dnf) 42 | ansible.builtin.dnf: 43 | name: '*' 44 | state: latest 45 | when: ansible_pkg_mgr == "dnf" 46 | register: patchingresultdnf 47 | 48 | - name: Build the report 49 | ansible.builtin.include_role: 50 | name: shadowman.reports.build_report_linux_patch 51 | apply: 52 | delegate_to: report.shadowman.dev 53 | run_once: true 54 | ``` 55 | -------------------------------------------------------------------------------- /roles/build_report_patch/tasks/main.yml: -------------------------------------------------------------------------------- 1 | - name: Ensure Apache is installed 2 | ansible.builtin.yum: 3 | name: httpd 4 | state: present 5 | 6 | - name: Ensure Apache is started 7 | ansible.builtin.service: 8 | name: httpd 9 | state: started 10 | 11 | - name: Create HTML report 12 | ansible.builtin.template: 13 | src: report.j2 14 | dest: "{{ file_path }}/patch.html" 15 | owner: root 16 | group: root 17 | mode: '0644' 18 | check_mode: false 19 | 20 | - name: Copy CSS over 21 | ansible.builtin.copy: 22 | src: "css" 23 | dest: "{{ file_path }}" 24 | directory_mode: true 25 | owner: root 26 | group: root 27 | mode: '0644' 28 | check_mode: false 29 | 30 | - name: Copy logo over 31 | ansible.builtin.copy: 32 | src: "webpage_logo.png" 33 | dest: "{{ file_path }}" 34 | directory_mode: true 35 | owner: root 36 | group: root 37 | mode: '0644' 38 | check_mode: false 39 | 40 | - name: Display link to Patch report 41 | ansible.builtin.debug: 42 | msg: "Please go to http://{{ ansible_host }}/patch.html" 43 | 44 | - name: Send Report via E-mail 45 | community.general.mail: 46 | host: "{{ EMAIL_HOST }}" 47 | username: "{{ EMAIL_USERNAME }}" 48 | password: "{{ EMAIL_PASSWORD }}" 49 | port: "{{ EMAIL_PORT }}" 50 | subject: "Patching Report" 51 | body: "{{ lookup('template', 'report.j2') }}" 52 | from: "{{ email_from }}" 53 | to: "{{ email_to }}" 54 | subtype: html 55 | delegate_to: localhost 56 | become: false 57 | check_mode: false 58 | when: sendemailreport 59 | -------------------------------------------------------------------------------- /roles/build_report_network/templates/lacp.j2: -------------------------------------------------------------------------------- 1 | 2 |
3 |
4 | 5 | 27 |
28 |
29 | -------------------------------------------------------------------------------- /roles/build_report_linux_patch/tasks/main.yml: -------------------------------------------------------------------------------- 1 | - name: Ensure Apache is installed 2 | ansible.builtin.yum: 3 | name: httpd 4 | state: present 5 | 6 | - name: Ensure Apache is started 7 | ansible.builtin.service: 8 | name: httpd 9 | state: started 10 | 11 | - name: Create HTML report 12 | ansible.builtin.template: 13 | src: report.j2 14 | dest: "{{ file_path }}/linuxpatch.html" 15 | owner: root 16 | group: root 17 | mode: '0644' 18 | check_mode: false 19 | 20 | - name: Copy CSS over 21 | ansible.builtin.copy: 22 | src: "css" 23 | dest: "{{ file_path }}" 24 | directory_mode: true 25 | owner: root 26 | group: root 27 | mode: '0644' 28 | check_mode: false 29 | 30 | - name: Copy logo over 31 | ansible.builtin.copy: 32 | src: "webpage_logo.png" 33 | dest: "{{ file_path }}" 34 | directory_mode: true 35 | owner: root 36 | group: root 37 | mode: '0644' 38 | check_mode: false 39 | 40 | - name: Display link to Linux patch report 41 | ansible.builtin.debug: 42 | msg: "Please go to http://{{ ansible_host }}/linuxpatch.html" 43 | 44 | - name: Send Report via E-mail 45 | community.general.mail: 46 | host: "{{ EMAIL_HOST }}" 47 | username: "{{ EMAIL_USERNAME }}" 48 | password: "{{ EMAIL_PASSWORD }}" 49 | port: "{{ EMAIL_PORT }}" 50 | subject: "Linux Patching Report" 51 | body: "{{ lookup('template', 'report.j2') }}" 52 | from: "{{ email_from }}" 53 | to: "{{ email_to }}" 54 | subtype: html 55 | delegate_to: localhost 56 | become: false 57 | check_mode: false 58 | when: sendemailreport 59 | -------------------------------------------------------------------------------- /roles/build_report_network/templates/bgp_address_family.j2: -------------------------------------------------------------------------------- 1 | 2 |
3 |
4 |

BGP Address Family

5 |
6 | {% if hostvars[network_switch]['ansible_network_resources']['bgp_address_family']['address_family'] is defined and hostvars[network_switch]['ansible_network_resources']['bgp_address_family']['address_family']|length > 0 %} 7 | 8 | {% for address_family in hostvars[network_switch]['ansible_network_resources']['bgp_address_family']['address_family'] %} 9 |

Address Family {{ address_family['afi'] }}

10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | {% if address_family['networks'] is defined %} 20 | {% for bgp_network in address_family['networks'] %} 21 | 22 | 23 | 24 | 25 | {% endfor %} 26 | {% endif %} 27 | 28 |
NetworkMask
{{ bgp_network['address']|default("Not Configured") }}{{ bgp_network['mask']|default("Not Configured") }}
29 | {% endfor %} 30 | 31 | {% elif hostvars[network_switch]['ansible_network_resources']['bgp_address_family']['address_family'] is defined and hostvars[network_switch]['ansible_network_resources']['bgp_address_family']['address_family']|length == 0 %} 32 | no BGP address-family is not configured on this device 33 | {% else %} 34 | No BGP information available 35 | {% endif %} 36 |
37 |
38 |
39 | -------------------------------------------------------------------------------- /roles/build_report_windows_patch/tasks/main.yml: -------------------------------------------------------------------------------- 1 | - name: Ensure Apache is installed 2 | ansible.builtin.yum: 3 | name: httpd 4 | state: present 5 | 6 | - name: Ensure Apache is started 7 | ansible.builtin.service: 8 | name: httpd 9 | state: started 10 | 11 | - name: Create HTML report 12 | ansible.builtin.template: 13 | src: report.j2 14 | dest: "{{ file_path }}/windowspatch.html" 15 | owner: root 16 | group: root 17 | mode: '0644' 18 | check_mode: false 19 | 20 | - name: Copy CSS over 21 | ansible.builtin.copy: 22 | src: "css" 23 | dest: "{{ file_path }}" 24 | directory_mode: true 25 | owner: root 26 | group: root 27 | mode: '0644' 28 | check_mode: false 29 | 30 | - name: Copy logo over 31 | ansible.builtin.copy: 32 | src: "webpage_logo.png" 33 | dest: "{{ file_path }}" 34 | directory_mode: true 35 | owner: root 36 | group: root 37 | mode: '0644' 38 | check_mode: false 39 | 40 | - name: Display link to Patch report 41 | ansible.builtin.debug: 42 | msg: "Please go to http://{{ ansible_host }}/windowspatch.html" 43 | 44 | - name: Send Report via E-mail 45 | community.general.mail: 46 | host: "{{ EMAIL_HOST }}" 47 | username: "{{ EMAIL_USERNAME }}" 48 | password: "{{ EMAIL_PASSWORD }}" 49 | port: "{{ EMAIL_PORT }}" 50 | subject: "Windows Patching Report" 51 | body: "{{ lookup('template', 'report.j2') }}" 52 | from: "{{ email_from }}" 53 | to: "{{ email_to }}" 54 | subtype: html 55 | delegate_to: localhost 56 | become: false 57 | check_mode: false 58 | when: sendemailreport 59 | -------------------------------------------------------------------------------- /galaxy.yml: -------------------------------------------------------------------------------- 1 | ### REQUIRED 2 | 3 | # The namespace of the collection. This can be a company/brand/organization or product namespace under which all 4 | # content lives. May only contain alphanumeric lowercase characters and underscores. Namespaces cannot start with 5 | # underscores or numbers and cannot contain consecutive underscores 6 | namespace: shadowman 7 | 8 | # The name of the collection. Has the same character restrictions as 'namespace' 9 | name: reports 10 | 11 | dependencies: 12 | community.general: '>=1.0.0' 13 | 14 | # The version of the collection. Must be compatible with semantic versioning 15 | version: 1.9.1 16 | 17 | # The path to the Markdown (.md) readme file. This path is relative to the root of the collection 18 | readme: README.md 19 | 20 | license_file: LICENSE 21 | 22 | # A list of the collection's content authors. Can be just the name or in the format 'Full Name (url) 23 | # @nicks:irc/im.site#channel' 24 | authors: 25 | - Alexander Dworjan 26 | 27 | repository: https://github.com/shadowman-lab/shadowman.reports 28 | 29 | ### OPTIONAL but strongly recommended 30 | 31 | # A short summary description of the collection 32 | description: Collection to create Linux and Windows server reports, Active Directory, Azure, GCP, AWS reports, patching report, tagging reports, and Networking reports including modules to pull server services and packages 33 | 34 | # A list of tags you want to associate with the collection for indexing/searching. A tag name has the same character 35 | # requirements as 'namespace' and 'name' 36 | tags: [reports, linux, windows, networking, cloud] 37 | -------------------------------------------------------------------------------- /roles/build_report_ad_users/README.md: -------------------------------------------------------------------------------- 1 | build_report_ad_users 2 | ======== 3 | 4 | Gathers users from an Active Directory Domain Controller and then on a Linux host installs Apache and creates a report based on current Active Directory Users 5 | 6 | 7 | Requirements 8 | ------------ 9 | 10 | Must run on an Active Directory Domain Controller and then the report must be deployed onto an Apache server 11 | 12 | Role Variables / Configuration 13 | -------------- 14 | 15 | N/A 16 | 17 | Dependencies 18 | ------------ 19 | 20 | N/A 21 | 22 | Example Playbook 23 | ---------------- 24 | 25 | The role can be used to create an html report on a Linux host by getting users from an Active Directory Domain Controller. 26 | 27 | 28 | ``` 29 | --- 30 | - name: Build AD User Info Report 31 | hosts: all 32 | 33 | tasks: 34 | 35 | - name: Get AD user accounts with groups and lock status 36 | ansible.windows.win_shell: | 37 | Import-Module ActiveDirectory 38 | Get-ADUser -Filter * -Property GivenName, Surname, SamAccountName, MemberOf, LockedOut | 39 | Select-Object GivenName, Surname, SamAccountName, @{Name="Groups";Expression={(Get-ADUser -Identity $_.SamAccountName -Property MemberOf | 40 | Select-Object -ExpandProperty MemberOf | Get-ADGroup | Select-Object -ExpandProperty Name) -join ", "}}, LockedOut | 41 | ConvertTo-Json 42 | register: ad_users 43 | 44 | - name: Build the report 45 | ansible.builtin.include_role: 46 | name: shadowman.reports.build_report_ad_users 47 | apply: 48 | delegate_to: report.shadowman.dev 49 | run_once: true 50 | ``` 51 | -------------------------------------------------------------------------------- /roles/build_report_patch/README.md: -------------------------------------------------------------------------------- 1 | build_report_patch 2 | ======== 3 | 4 | Installs Apache and creates a report based on facts from Linux patching and Windows update job 5 | 6 | Requirements 7 | ------------ 8 | 9 | Must run on Apache server on RHEL 10 | 11 | Role Variables / Configuration 12 | -------------- 13 | 14 | Must register yum results as patchingresult and dnf results as patchingresultdnf. Set Windows patching results to patchresult variable. Set var sendemailreport to false if not also sending the report via e-mail 15 | 16 | Dependencies 17 | ------------ 18 | 19 | N/A 20 | 21 | Example Playbook 22 | ---------------- 23 | 24 | The role can be used to create an html patching report on a Linux host using any number of Windows & RHEL servers 25 | 26 | 27 | ``` 28 | --- 29 | - name: Windows patching playbook 30 | hosts: all 31 | 32 | tasks: 33 | 34 | - name: Install Windows Updates 35 | ansible.windows.win_updates: 36 | category_names: '*' 37 | reboot: yes 38 | register: patchresult 39 | 40 | - name: upgrade all packages (yum) 41 | ansible.builtin.yum: 42 | name: '*' 43 | state: latest 44 | when: ansible_pkg_mgr == "yum" 45 | register: patchingresult 46 | 47 | - name: upgrade all packages (dnf) 48 | ansible.builtin.dnf: 49 | name: '*' 50 | state: latest 51 | when: ansible_pkg_mgr == "dnf" 52 | register: patchingresultdnf 53 | 54 | - name: Build the report 55 | ansible.builtin.include_role: 56 | name: shadowman.reports.build_report_patch 57 | apply: 58 | delegate_to: report.shadowman.dev 59 | run_once: true 60 | 61 | ``` 62 | -------------------------------------------------------------------------------- /roles/build_report_linux/README.md: -------------------------------------------------------------------------------- 1 | build_report_linux 2 | ======== 3 | 4 | Installs Apache and creates a report based on facts from Linux services and packages modules. Utilize var "detailedreport=false" if you do not need packages or services information. 5 | 6 | Requirements 7 | ------------ 8 | 9 | Must run on Apache server 10 | 11 | Role Variables / Configuration 12 | -------------- 13 | 14 | N/A 15 | 16 | Dependencies 17 | ------------ 18 | 19 | N/A 20 | 21 | Example Playbook 22 | ---------------- 23 | 24 | The role can be used to create an html report on any number of Linux hosts using any number of Linux servers about their services and packages installed. Added in a boolean var usesingletemplate if running into issues with jinja not adding in the package/services facts. 25 | 26 | 27 | ``` 28 | --- 29 | - name: Create Linux Report 30 | hosts: all 31 | tasks: 32 | 33 | - name: Scan packages (Unix/Linux) 34 | ansible.builtin.package_facts: 35 | register: result 36 | when: ansible_os_family != "Windows" 37 | 38 | - name: Organize results for loopings 39 | ansible.builtin.set_fact: 40 | packagefacts: "{{ result.ansible_facts.packages | dict2items }}" 41 | cacheable: true 42 | when: ansible_os_family != "Windows" 43 | 44 | - name: Scan services (Unix/Linux) 45 | ansible.builtin.service_facts: 46 | when: ansible_os_family != "Windows" 47 | 48 | - name: Build the report 49 | ansible.builtin.include_role: 50 | name: shadowman.reports.build_report_linux 51 | apply: 52 | delegate_to: report.shadowman.dev 53 | run_once: true 54 | ``` 55 | -------------------------------------------------------------------------------- /roles/build_report_network/templates/vlans.j2: -------------------------------------------------------------------------------- 1 | 2 |
3 |
4 | 5 | 31 |
32 |
33 | -------------------------------------------------------------------------------- /roles/build_report_network/templates/lldp_interfaces.j2: -------------------------------------------------------------------------------- 1 | 2 |
3 |
4 | 5 | 31 |
32 |
33 | -------------------------------------------------------------------------------- /roles/build_report_google/README.md: -------------------------------------------------------------------------------- 1 | build_report_google 2 | ======== 3 | 4 | Installs Apache and creates a report based on facts from Google. 5 | 6 | Requirements 7 | ------------ 8 | 9 | Must deploy to Apache server 10 | 11 | Role Variables / Configuration 12 | -------------- 13 | 14 | N/A 15 | 16 | Dependencies 17 | ------------ 18 | 19 | N/A 20 | 21 | Example Playbook 22 | ---------------- 23 | 24 | The role can be used to create an html report on Google statistics onto an apache server. 25 | 26 | 27 | ``` 28 | --- 29 | - name: Create Google Detailed Report 30 | hosts: localhost 31 | tasks: 32 | 33 | - name: Get list of all Zones 34 | ansible.builtin.shell: | 35 | gcloud compute zones list --uri \ 36 | --account=${GCE_EMAIL} \ 37 | --project=${GCP_PROJECT} \ 38 | --credential-file-override=${GCE_CREDENTIALS_FILE_PATH} \ 39 | | sed -e 's,.*/,,' 40 | register: all_zones 41 | changed_when: false 42 | environment: 43 | GCE_EMAIL: "{{ lookup('env', 'GCE_EMAIL') }}" 44 | GCP_PROJECT: "{{ lookup('env', 'GCP_PROJECT') }}" 45 | GCE_CREDENTIALS_FILE_PATH: "{{ lookup('env', 'GCE_CREDENTIALS_FILE_PATH') }}" 46 | 47 | - name: Get all virtual networks 48 | google.cloud.gcp_compute_network_info: 49 | auth_kind: serviceaccount 50 | register: gcp_networks 51 | 52 | - name: Retrieve VMs from your environment 53 | google.cloud.gcp_compute_instance_info: 54 | zone: "{{ item }}" 55 | project: "{{ gcp_project }}" 56 | auth_kind: serviceaccount 57 | loop: "{{ all_zones.stdout_lines }}" 58 | register: gcp_vms 59 | 60 | - name: Build the report 61 | ansible.builtin.include_role: 62 | name: shadowman.reports.build_report_google 63 | apply: 64 | delegate_to: report.shadowman.dev 65 | run_once: true 66 | ``` 67 | -------------------------------------------------------------------------------- /roles/build_report_certs/README.md: -------------------------------------------------------------------------------- 1 | build_report_certs 2 | ======== 3 | 4 | Installs Apache and creates a report based on certificates on a specified port 5 | 6 | Requirements 7 | ------------ 8 | 9 | Must run on Apache server 10 | 11 | Role Variables / Configuration 12 | -------------- 13 | 14 | Must register facts for each host expire_days, issuer, expiration, expired, include_no_cert. Set var sendemailreport to false if not also sending the report via e-mail 15 | 16 | Dependencies 17 | ------------ 18 | 19 | N/A 20 | 21 | Example Playbook 22 | ---------------- 23 | 24 | The role can be used to create an html report on any number of RHEL hosts using any number of servers about their certificate results 25 | 26 | 27 | ``` 28 | --- 29 | - name: Check Certificates on port 30 | hosts: all 31 | 32 | tasks: 33 | 34 | - name: Block for cert Check 35 | block: 36 | 37 | - name: Get the cert from a port 38 | community.crypto.get_certificate: 39 | host: "{{ inventory_hostname }}" 40 | port: "{{ certificate_port }}" 41 | delegate_to: localhost 42 | register: cert 43 | 44 | - name: Set facts for report 45 | ansible.builtin.set_fact: 46 | expire_days: "{{ ((cert.not_after | to_datetime('%Y%m%d%H%M%SZ')) - (ansible_date_time.iso8601 | to_datetime('%Y-%m-%dT%H:%M:%SZ'))).days }}" 47 | issuer: "{{ cert.issuer }}" 48 | expiration: "{{ cert.not_after | to_datetime('%Y%m%d%H%M%SZ') }}" 49 | expired: "{{ cert.expired }}" 50 | 51 | rescue: 52 | 53 | - name: Display error 54 | ansible.builtin.debug: 55 | msg: "{{ cert.msg }}" 56 | 57 | - name: Build the report 58 | ansible.builtin.include_role: 59 | name: shadowman.reports.build_report_certs 60 | apply: 61 | delegate_to: report.shadowman.dev 62 | run_once: true 63 | ``` 64 | -------------------------------------------------------------------------------- /roles/build_report_network/templates/static.j2: -------------------------------------------------------------------------------- 1 | 2 |
3 |
4 |

Static Routes

5 |
6 | {% if hostvars[network_switch]['ansible_network_resources']['static_routes'] is defined and hostvars[network_switch]['ansible_network_resources']['static_routes']|length > 0 %} 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | {% for net_route in hostvars[network_switch]['ansible_network_resources']['static_routes'] %} 18 | 19 | 20 | {% for address_family in net_route.address_families|default([]) %} 21 | 22 | {% for routes in address_family['routes'] %} 23 | 24 | 38 | {% endfor %} 39 | {% endfor %} 40 | 41 | {% endfor %} 42 | 43 |
VRFAddress-FamilyRouteNext-Hop
{{ net_route['vrf']|default("N/A") }}{{ address_family['afi']|default("N/A") }}{{ routes['dest']|default("N/A") }} 25 | 26 | 27 | 28 | 29 | 30 | {% for next_hops in routes['next_hops'] %} 31 | 32 | 33 | 34 | 35 | 36 | {% endfor %} 37 |
InterfaceAddressGlobal
{{ next_hops['interface']|default("N/A") }}{{ next_hops['forward_router_address']|default("N/A") }}{{ next_hops['global']|default("N/A") }}
44 | {% elif hostvars[network_switch]['ansible_network_resources']['static_routes'] is defined and hostvars[network_switch]['ansible_network_resources']['static_routes']|length == 0 %} 45 | Static Routes are not configured on this device 46 | {% else %} 47 | No Static Route information available 48 | {% endif %} 49 |
50 |
51 |
52 | -------------------------------------------------------------------------------- /roles/build_report_network/templates/bgp.j2: -------------------------------------------------------------------------------- 1 | 2 |
3 |
4 |

BGP Global Info

5 |
6 | {% if hostvars[network_switch]['ansible_network_resources']['bgp_global'] is defined and hostvars[network_switch]['ansible_network_resources']['bgp_global']|length > 0 %} 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 |
ASNRouter ID
{{ hostvars[network_switch].ansible_network_resources.bgp_global['as_number']|default("Not Configured") }}{{ hostvars[network_switch].ansible_network_resources.bgp_global.bgp['router_id']['address']|default("Not Configured") }}
22 | {% if hostvars[network_switch]['ansible_network_resources']['bgp_global'][ 23 | 'neighbor'] is defined and hostvars[network_switch]['ansible_network_resources']['bgp_global'][ 24 | 'neighbor']|length > 0 %} 25 |

BGP Neighbors

26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | {% for bgp_neighbor in hostvars[network_switch].ansible_network_resources.bgp_global.neighbor %} 36 | 37 | 38 | 39 | 40 | {% endfor %} 41 | 42 |
AddressRemote AS
{{ bgp_neighbor['address']|default("Not Configured") }}{{ bgp_neighbor['remote_as']|default("Not Configured") }}
43 | {% endif %} 44 | {% elif hostvars[network_switch]['ansible_network_resources']['bgp_global'] is defined and hostvars[network_switch]['ansible_network_resources']['bgp_global']|length == 0 %} 45 | BGP is not configured on this device 46 | {% else %} 47 | No BGP information available 48 | {% endif %} 49 |
50 |
51 |
52 | -------------------------------------------------------------------------------- /roles/build_report_network/templates/ospf.j2: -------------------------------------------------------------------------------- 1 | 2 |
3 |
4 | 5 | 33 |
34 |
35 | -------------------------------------------------------------------------------- /roles/build_report_network/templates/interfaces.j2: -------------------------------------------------------------------------------- 1 | 2 |
3 |
4 | 7 | 39 |
40 |
41 | -------------------------------------------------------------------------------- /roles/build_report_network/templates/l2_interfaces.j2: -------------------------------------------------------------------------------- 1 | 2 |
3 |
4 | 5 | 35 |
36 |
37 | -------------------------------------------------------------------------------- /roles/build_report_google/templates/gcp.j2: -------------------------------------------------------------------------------- 1 | 2 | 3 | {% set gcp_vars = hostvars["localhost"] %} 4 | {% set real_location = gcp_vars.all_zones.stdout_lines %} 5 | 6 |
7 | {% for location in gcp_vars.gcp_vms.results %} 8 | 9 | {% set running = location.resources | selectattr('status', 'equalto', "RUNNING") | length %} 10 | {% set stopped = location.resources | selectattr('status', 'equalto', "TERMINATED") | length %} 11 | 12 |
13 |

14 |
{{ location.item }}
15 | {% if location.resources | length > 0 %} 16 | 17 |
({{ running }} Running VMs) 18 |
19 |
{{ stopped }} Stopped VMs ({{ location.resources | length }} Total Virtual Machines) 20 |
21 | 22 | {% endif %} 23 |

24 |
25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | {% for vm in location.resources %} 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | {% endfor %} 45 | 46 |
VM NameVM ID VM StatusPrivate IPPublic IPVM Labels
{{ vm.name }}{{ vm.id }}{{ vm.status }}{{ vm.networkInterfaces[0].networkIP | default ("No Private IP") }}{{ vm.networkInterfaces[0].accessConfigs[0].natIP | default ("No Public IP") }}{{ vm.labels | default ("No Labels") }}
47 |
48 |
49 | {% endfor %} 50 |
51 | 52 | 53 | -------------------------------------------------------------------------------- /roles/build_report_google/templates/report.j2: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Cloud Google Automation Report 5 | 6 | 7 | 8 | 9 | 10 | 19 | 20 | 21 | {% include 'header.j2' %} 22 |
23 |
24 |

Cloud Google Automation Report

25 |
26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 56 | 59 | 60 | 61 |
Public CloudRegion
36 |
37 | picture of cloud 38 |

Google Cloud

39 |
40 |
41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 |
Google Cloud Login{{ lookup('env', 'GCE_EMAIL') }}
Google Cloud Project{{ lookup('env', 'GCP_PROJECT') }}
53 | {% include 'ansible.j2' %} 54 |
55 |
57 | {% include 'gcp.j2' %} 58 |
62 |

Created with


red hat ansible automation platform logo 63 |
64 |
65 |
66 | 67 | 68 | -------------------------------------------------------------------------------- /roles/build_report_cloud/templates/report.j2: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Cloud Automation Report 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 21 | 22 | 23 |
24 | {% include 'header.j2' %} 25 |
26 |
27 |

Ansible Hybrid Cloud Automation Example Report

28 |
29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 58 | 61 | 62 | 63 |
Public CloudSubscription
39 |
40 |

41 |

42 |
43 |
44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 |
Azure Client ID{{ azure_client | default('unknown') }}
Subscription ID{{ azure_sub_id | default('unknown') }}
56 |
57 |
59 | {% include 'vnet.j2' %} 60 |
64 |

Created with


65 |
66 |
67 |
68 | 69 | -------------------------------------------------------------------------------- /docs/shadowman.reports.win_scan_packages_module.rst: -------------------------------------------------------------------------------- 1 | .. _shadowman.reports.win_scan_packages: 2 | 3 | 4 | ****************** 5 | shadowman.reports.win_scan_packages 6 | ****************** 7 | 8 | **Windows Scan Packages module** 9 | 10 | 11 | Version added: 1.0.0 12 | 13 | .. contents:: 14 | :local: 15 | :depth: 1 16 | 17 | 18 | Synopsis 19 | -------- 20 | - This module scans packages on Windows hosts. 21 | 22 | 23 | Parameters 24 | ---------- 25 | - None 26 | 27 | 28 | Notes 29 | ----- 30 | 31 | .. note:: 32 | - Tested against Windows Server 2016 33 | 34 | 35 | Examples 36 | -------- 37 | 38 | .. code-block:: yaml 39 | 40 | 41 | tasks: 42 | 43 | - name: Scan Packages 44 | shadowman.reports.win_scan_packages: 45 | 46 | 47 | Return Values 48 | ------------- 49 | Common return values are documented `here `_, the following are the fields unique to this module: 50 | 51 | .. raw:: html 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 68 | 69 | 75 | 76 |
KeyReturnedDescription
61 |
62 | packages 63 | 64 |
65 | list 66 |
67 |
always 70 |
A list of packages, including the name, version, publisher and arch.
71 |
72 |
Sample:
73 |
The configuration returned will always be in the same format of the parameters above.
74 |
77 |

78 | 79 | 80 | Status 81 | ------ 82 | 83 | 84 | Authors 85 | ~~~~~~~ 86 | 87 | - Alex Dworjan -------------------------------------------------------------------------------- /docs/shadowman.reports.win_scan_services_module.rst: -------------------------------------------------------------------------------- 1 | .. _shadowman.reports.win_scan_services: 2 | 3 | 4 | ****************** 5 | shadowman.reports.win_scan_services 6 | ****************** 7 | 8 | **Windows Scan Services module** 9 | 10 | 11 | Version added: 1.0.0 12 | 13 | .. contents:: 14 | :local: 15 | :depth: 1 16 | 17 | 18 | Synopsis 19 | -------- 20 | - This module scans services on Windows hosts. 21 | 22 | 23 | Parameters 24 | ---------- 25 | - None 26 | 27 | 28 | Notes 29 | ----- 30 | 31 | .. note:: 32 | - Tested against Windows Server 2016 33 | 34 | 35 | Examples 36 | -------- 37 | 38 | .. code-block:: yaml 39 | 40 | 41 | tasks: 42 | 43 | - name: Scan Services 44 | shadowman.reports.win_scan_services: 45 | 46 | 47 | Return Values 48 | ------------- 49 | Common return values are documented `here `_, the following are the fields unique to this module: 50 | 51 | .. raw:: html 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 68 | 69 | 75 | 76 |
KeyReturnedDescription
61 |
62 | services 63 | 64 |
65 | list 66 |
67 |
always 70 |
A list of packages, including the name, Windows Service Name, and state.
71 |
72 |
Sample:
73 |
The configuration returned will always be in the same format of the parameters above.
74 |
77 |

78 | 79 | 80 | Status 81 | ------ 82 | 83 | 84 | Authors 85 | ~~~~~~~ 86 | 87 | - Alex Dworjan -------------------------------------------------------------------------------- /roles/build_report_ad_users/templates/fullreport.j2: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Active Directory Users 6 | 50 | 51 | 52 |
53 | 54 |

Active Directory Users

55 |
56 | 57 |
58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | {% for user in users %} 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | {% endfor %} 78 |
First NameSurnameUsernameGroupsAccount Locked
{{ user.GivenName }}{{ user.Surname }}{{ user.SamAccountName }}{{ user.Groups }}{{ user.LockedOut }}
79 | 80 | 81 | -------------------------------------------------------------------------------- /roles/build_report_tags/files/css/main.css: -------------------------------------------------------------------------------- 1 | p.hostname { 2 | color: #000000; 3 | font-weight: bolder; 4 | font-size: large; 5 | } 6 | 7 | #subtable { 8 | background: #ebebeb; 9 | margin: 0px; 10 | } 11 | 12 | #subtable tbody tr td { 13 | padding: 5px 5px 5px 5px; 14 | } 15 | 16 | #subtable thead th { 17 | padding: 5px; 18 | } 19 | 20 | * { 21 | -moz-box-sizing: border-box; 22 | -webkit-box-sizing: border-box; 23 | box-sizing: border-box; 24 | font-family: "Open Sans", "Helvetica"; 25 | 26 | } 27 | 28 | a { 29 | color: #ffffff; 30 | } 31 | 32 | p { 33 | color: #ffffff; 34 | } 35 | h1 { 36 | text-align: center; 37 | color: #ffffff; 38 | } 39 | 40 | body { 41 | background:#353a40; 42 | } 43 | 44 | table { 45 | border-collapse: separate; 46 | background:#fff; 47 | @include border-radius(5px); 48 | margin:50px auto; 49 | @include box-shadow(0px 0px 5px rgba(0,0,0,0.3)); 50 | } 51 | 52 | thead { 53 | @include border-radius(5px); 54 | } 55 | 56 | thead th { 57 | font-family: 'Patua One', monospace; 58 | font-size:16px; 59 | font-weight:400; 60 | color:#fff; 61 | @include text-shadow(1px 1px 0px rgba(0,0,0,0.5)); 62 | text-align:left; 63 | padding:20px; 64 | border-top:1px solid #858d99; 65 | background: #353a40; 66 | 67 | &:first-child { 68 | @include border-top-left-radius(5px); 69 | } 70 | 71 | &:last-child { 72 | @include border-top-right-radius(5px); 73 | } 74 | } 75 | 76 | tbody tr td { 77 | font-family: 'Open Sans', sans-serif; 78 | font-weight:400; 79 | color:#5f6062; 80 | font-size:13px; 81 | padding:20px 20px 20px 20px; 82 | border-bottom:1px solid #e0e0e0; 83 | 84 | } 85 | 86 | tbody tr:nth-child(2n) { 87 | background:#f0f3f5; 88 | } 89 | 90 | tbody tr:last-child td { 91 | border-bottom:none; 92 | &:first-child { 93 | @include border-bottom-left-radius(5px); 94 | } 95 | &:last-child { 96 | @include border-bottom-right-radius(5px); 97 | } 98 | } 99 | 100 | span.highlight { 101 | background-color: yellow; 102 | } 103 | 104 | .expandclass { 105 | color: #5f6062; 106 | } 107 | 108 | .content{ 109 | display:none; 110 | margin: 10px; 111 | } -------------------------------------------------------------------------------- /roles/build_report_certs/files/css/main.css: -------------------------------------------------------------------------------- 1 | p.hostname { 2 | color: #000000; 3 | font-weight: bolder; 4 | font-size: large; 5 | } 6 | 7 | #subtable { 8 | background: #ebebeb; 9 | margin: 0px; 10 | } 11 | 12 | #subtable tbody tr td { 13 | padding: 5px 5px 5px 5px; 14 | } 15 | 16 | #subtable thead th { 17 | padding: 5px; 18 | } 19 | 20 | * { 21 | -moz-box-sizing: border-box; 22 | -webkit-box-sizing: border-box; 23 | box-sizing: border-box; 24 | font-family: "Open Sans", "Helvetica"; 25 | 26 | } 27 | 28 | a { 29 | color: #ffffff; 30 | } 31 | 32 | p { 33 | color: #ffffff; 34 | } 35 | h1 { 36 | text-align: center; 37 | color: #ffffff; 38 | } 39 | 40 | body { 41 | background:#353a40; 42 | } 43 | 44 | table { 45 | border-collapse: separate; 46 | background:#fff; 47 | @include border-radius(5px); 48 | margin:50px auto; 49 | @include box-shadow(0px 0px 5px rgba(0,0,0,0.3)); 50 | } 51 | 52 | thead { 53 | @include border-radius(5px); 54 | } 55 | 56 | thead th { 57 | font-family: 'Patua One', monospace; 58 | font-size:16px; 59 | font-weight:400; 60 | color:#fff; 61 | @include text-shadow(1px 1px 0px rgba(0,0,0,0.5)); 62 | text-align:left; 63 | padding:20px; 64 | border-top:1px solid #858d99; 65 | background: #353a40; 66 | 67 | &:first-child { 68 | @include border-top-left-radius(5px); 69 | } 70 | 71 | &:last-child { 72 | @include border-top-right-radius(5px); 73 | } 74 | } 75 | 76 | tbody tr td { 77 | font-family: 'Open Sans', sans-serif; 78 | font-weight:400; 79 | color:#5f6062; 80 | font-size:13px; 81 | padding:20px 20px 20px 20px; 82 | border-bottom:1px solid #e0e0e0; 83 | 84 | } 85 | 86 | tbody tr:nth-child(2n) { 87 | background:#f0f3f5; 88 | } 89 | 90 | tbody tr:last-child td { 91 | border-bottom:none; 92 | &:first-child { 93 | @include border-bottom-left-radius(5px); 94 | } 95 | &:last-child { 96 | @include border-bottom-right-radius(5px); 97 | } 98 | } 99 | 100 | span.highlight { 101 | background-color: yellow; 102 | } 103 | 104 | .expandclass { 105 | color: #5f6062; 106 | } 107 | 108 | .content{ 109 | display:none; 110 | margin: 10px; 111 | } -------------------------------------------------------------------------------- /roles/build_report_patch/files/css/main.css: -------------------------------------------------------------------------------- 1 | p.hostname { 2 | color: #000000; 3 | font-weight: bolder; 4 | font-size: large; 5 | } 6 | 7 | #subtable { 8 | background: #ebebeb; 9 | margin: 0px; 10 | } 11 | 12 | #subtable tbody tr td { 13 | padding: 5px 5px 5px 5px; 14 | } 15 | 16 | #subtable thead th { 17 | padding: 5px; 18 | } 19 | 20 | * { 21 | -moz-box-sizing: border-box; 22 | -webkit-box-sizing: border-box; 23 | box-sizing: border-box; 24 | font-family: "Open Sans", "Helvetica"; 25 | 26 | } 27 | 28 | a { 29 | color: #ffffff; 30 | } 31 | 32 | p { 33 | color: #ffffff; 34 | } 35 | h1 { 36 | text-align: center; 37 | color: #ffffff; 38 | } 39 | 40 | body { 41 | background:#353a40; 42 | } 43 | 44 | table { 45 | border-collapse: separate; 46 | background:#fff; 47 | @include border-radius(5px); 48 | margin:50px auto; 49 | @include box-shadow(0px 0px 5px rgba(0,0,0,0.3)); 50 | } 51 | 52 | thead { 53 | @include border-radius(5px); 54 | } 55 | 56 | thead th { 57 | font-family: 'Patua One', monospace; 58 | font-size:16px; 59 | font-weight:400; 60 | color:#fff; 61 | @include text-shadow(1px 1px 0px rgba(0,0,0,0.5)); 62 | text-align:left; 63 | padding:20px; 64 | border-top:1px solid #858d99; 65 | background: #353a40; 66 | 67 | &:first-child { 68 | @include border-top-left-radius(5px); 69 | } 70 | 71 | &:last-child { 72 | @include border-top-right-radius(5px); 73 | } 74 | } 75 | 76 | tbody tr td { 77 | font-family: 'Open Sans', sans-serif; 78 | font-weight:400; 79 | color:#5f6062; 80 | font-size:13px; 81 | padding:20px 20px 20px 20px; 82 | border-bottom:1px solid #e0e0e0; 83 | 84 | } 85 | 86 | tbody tr:nth-child(2n) { 87 | background:#f0f3f5; 88 | } 89 | 90 | tbody tr:last-child td { 91 | border-bottom:none; 92 | &:first-child { 93 | @include border-bottom-left-radius(5px); 94 | } 95 | &:last-child { 96 | @include border-bottom-right-radius(5px); 97 | } 98 | } 99 | 100 | span.highlight { 101 | background-color: yellow; 102 | } 103 | 104 | .expandclass { 105 | color: #5f6062; 106 | } 107 | 108 | .content{ 109 | display:none; 110 | margin: 10px; 111 | } -------------------------------------------------------------------------------- /roles/build_report_linux_patch/files/css/main.css: -------------------------------------------------------------------------------- 1 | p.hostname { 2 | color: #000000; 3 | font-weight: bolder; 4 | font-size: large; 5 | } 6 | 7 | #subtable { 8 | background: #ebebeb; 9 | margin: 0px; 10 | } 11 | 12 | #subtable tbody tr td { 13 | padding: 5px 5px 5px 5px; 14 | } 15 | 16 | #subtable thead th { 17 | padding: 5px; 18 | } 19 | 20 | * { 21 | -moz-box-sizing: border-box; 22 | -webkit-box-sizing: border-box; 23 | box-sizing: border-box; 24 | font-family: "Open Sans", "Helvetica"; 25 | 26 | } 27 | 28 | a { 29 | color: #ffffff; 30 | } 31 | 32 | p { 33 | color: #ffffff; 34 | } 35 | h1 { 36 | text-align: center; 37 | color: #ffffff; 38 | } 39 | 40 | body { 41 | background:#353a40; 42 | } 43 | 44 | table { 45 | border-collapse: separate; 46 | background:#fff; 47 | @include border-radius(5px); 48 | margin:50px auto; 49 | @include box-shadow(0px 0px 5px rgba(0,0,0,0.3)); 50 | } 51 | 52 | thead { 53 | @include border-radius(5px); 54 | } 55 | 56 | thead th { 57 | font-family: 'Patua One', monospace; 58 | font-size:16px; 59 | font-weight:400; 60 | color:#fff; 61 | @include text-shadow(1px 1px 0px rgba(0,0,0,0.5)); 62 | text-align:left; 63 | padding:20px; 64 | border-top:1px solid #858d99; 65 | background: #353a40; 66 | 67 | &:first-child { 68 | @include border-top-left-radius(5px); 69 | } 70 | 71 | &:last-child { 72 | @include border-top-right-radius(5px); 73 | } 74 | } 75 | 76 | tbody tr td { 77 | font-family: 'Open Sans', sans-serif; 78 | font-weight:400; 79 | color:#5f6062; 80 | font-size:13px; 81 | padding:20px 20px 20px 20px; 82 | border-bottom:1px solid #e0e0e0; 83 | 84 | } 85 | 86 | tbody tr:nth-child(2n) { 87 | background:#f0f3f5; 88 | } 89 | 90 | tbody tr:last-child td { 91 | border-bottom:none; 92 | &:first-child { 93 | @include border-bottom-left-radius(5px); 94 | } 95 | &:last-child { 96 | @include border-bottom-right-radius(5px); 97 | } 98 | } 99 | 100 | span.highlight { 101 | background-color: yellow; 102 | } 103 | 104 | .expandclass { 105 | color: #5f6062; 106 | } 107 | 108 | .content{ 109 | display:none; 110 | margin: 10px; 111 | } -------------------------------------------------------------------------------- /roles/build_report_windows_patch/files/css/main.css: -------------------------------------------------------------------------------- 1 | p.hostname { 2 | color: #000000; 3 | font-weight: bolder; 4 | font-size: large; 5 | } 6 | 7 | #subtable { 8 | background: #ebebeb; 9 | margin: 0px; 10 | } 11 | 12 | #subtable tbody tr td { 13 | padding: 5px 5px 5px 5px; 14 | } 15 | 16 | #subtable thead th { 17 | padding: 5px; 18 | } 19 | 20 | * { 21 | -moz-box-sizing: border-box; 22 | -webkit-box-sizing: border-box; 23 | box-sizing: border-box; 24 | font-family: "Open Sans", "Helvetica"; 25 | 26 | } 27 | 28 | a { 29 | color: #ffffff; 30 | } 31 | 32 | p { 33 | color: #ffffff; 34 | } 35 | h1 { 36 | text-align: center; 37 | color: #ffffff; 38 | } 39 | 40 | body { 41 | background:#353a40; 42 | } 43 | 44 | table { 45 | border-collapse: separate; 46 | background:#fff; 47 | @include border-radius(5px); 48 | margin:50px auto; 49 | @include box-shadow(0px 0px 5px rgba(0,0,0,0.3)); 50 | } 51 | 52 | thead { 53 | @include border-radius(5px); 54 | } 55 | 56 | thead th { 57 | font-family: 'Patua One', monospace; 58 | font-size:16px; 59 | font-weight:400; 60 | color:#fff; 61 | @include text-shadow(1px 1px 0px rgba(0,0,0,0.5)); 62 | text-align:left; 63 | padding:20px; 64 | border-top:1px solid #858d99; 65 | background: #353a40; 66 | 67 | &:first-child { 68 | @include border-top-left-radius(5px); 69 | } 70 | 71 | &:last-child { 72 | @include border-top-right-radius(5px); 73 | } 74 | } 75 | 76 | tbody tr td { 77 | font-family: 'Open Sans', sans-serif; 78 | font-weight:400; 79 | color:#5f6062; 80 | font-size:13px; 81 | padding:20px 20px 20px 20px; 82 | border-bottom:1px solid #e0e0e0; 83 | 84 | } 85 | 86 | tbody tr:nth-child(2n) { 87 | background:#f0f3f5; 88 | } 89 | 90 | tbody tr:last-child td { 91 | border-bottom:none; 92 | &:first-child { 93 | @include border-bottom-left-radius(5px); 94 | } 95 | &:last-child { 96 | @include border-bottom-right-radius(5px); 97 | } 98 | } 99 | 100 | span.highlight { 101 | background-color: yellow; 102 | } 103 | 104 | .expandclass { 105 | color: #5f6062; 106 | } 107 | 108 | .content{ 109 | display:none; 110 | margin: 10px; 111 | } -------------------------------------------------------------------------------- /roles/build_report_tags/README.md: -------------------------------------------------------------------------------- 1 | build_report_tags 2 | ======== 3 | 4 | Installs Apache and creates a report based on tags from RHV, VMWare, or Azure. 5 | 6 | Requirements 7 | ------------ 8 | 9 | Must run on Apache server 10 | 11 | Role Variables / Configuration 12 | -------------- 13 | 14 | Must register rhv results as rhv_info, azure results as azure_info, aws results as aws_info, and vmware results as vmware_info. Set var sendemailreport to false if not also sending the report via e-mail 15 | 16 | Dependencies 17 | ------------ 18 | 19 | N/A 20 | 21 | Example Playbook 22 | ---------------- 23 | 24 | The role can be used to create an html report on the tags from Azure, RHV, and VMWare 25 | 26 | 27 | ``` 28 | - name: Build Tags Report 29 | hosts: localhost 30 | gather_facts: false 31 | 32 | tasks: 33 | 34 | - name: Get VMWare tag info 35 | community.vmware.vmware_vm_info: 36 | validate_certs: false 37 | show_tag: true 38 | vm_type: "vm" 39 | register: vmware_info 40 | 41 | - name: Get Azure VM Info 42 | azure.azcollection.azure_rm_virtualmachine_info: 43 | register: azure_info 44 | 45 | - name: Get AWS regions 46 | amazon.aws.aws_region_info: 47 | region: "us-east-2" 48 | register: allregions 49 | 50 | - name: Get AWS VM Info 51 | amazon.aws.ec2_instance_info: 52 | region: "{{ item.region_name }}" 53 | loop: "{{ allregions.regions }}" 54 | loop_control: 55 | label: "{{ item.region_name }}" 56 | register: aws_info 57 | 58 | - name: Block for RHV 59 | block: 60 | - name: Login to RHV 61 | redhat.rhv.ovirt_auth: 62 | hostname: "{{ rhvm_fqdn }}" 63 | username: "{{ rhvm_user }}" 64 | password: "{{ rhvm_password }}" 65 | ca_file: "{{ rhvm_cafile | default(omit) }}" 66 | insecure: "{{ rhvm_insecure | default(true) }}" 67 | 68 | - name: Get RHV VM info 69 | redhat.rhv.ovirt_vm_info: 70 | auth: "{{ ovirt_auth }}" 71 | follow: 72 | - tags 73 | register: rhv_info 74 | 75 | always: 76 | - name: Logout from RHV 77 | redhat.rhv.ovirt_auth: 78 | state: absent 79 | ovirt_auth: "{{ ovirt_auth }}" 80 | 81 | - name: Build the report 82 | ansible.builtin.include_role: 83 | name: shadowman.reports.build_report_tags 84 | apply: 85 | delegate_to: report.shadowman.dev 86 | run_once: true 87 | ``` 88 | -------------------------------------------------------------------------------- /roles/build_report_network/templates/l3_interfaces.j2: -------------------------------------------------------------------------------- 1 | 2 |
3 |
4 | 5 | 56 |
57 |
58 | -------------------------------------------------------------------------------- /roles/build_report_aws/templates/report.j2: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Cloud AWS Automation Report 5 | 6 | 7 | 8 | 9 | 10 | 19 | 20 | 21 | {% include 'header.j2' %} 22 |
23 |
24 |

Cloud AWS Automation Report

25 |
26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 69 | 70 | 73 | 74 | 75 | 76 |
Public CloudRegion
36 |
37 | picture of cloud 38 |

AWS

39 |
40 |
41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 |
Boto3 Version{{ boto3_version | default ('unknown')}}
AWS user{{ aws_user | default('unknown') }}
Account ID{{ whoami.account | default('unknown') }}
Account Alias{{ whoami.account_alias | default ('unknown')}}
61 | 62 | 63 | {% include 'ansible.j2' %} 64 |
65 | 66 | 67 | 68 |
71 | {% include 'vpc.j2' %} 72 |
77 |

Created with


red hat ansible automation platform logo 78 |
79 |
80 |
81 | 82 | -------------------------------------------------------------------------------- /plugins/modules/win_scan_packages.ps1: -------------------------------------------------------------------------------- 1 | #!powershell 2 | # This file is part of Ansible 3 | # 4 | # Ansible is free software: you can redistribute it and/or modify 5 | # it under the terms of the GNU General Public License as published by 6 | # the Free Software Foundation, either version 3 of the License, or 7 | # (at your option) any later version. 8 | # 9 | # Ansible is distributed in the hope that it will be useful, 10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | # GNU General Public License for more details. 13 | # 14 | # You should have received a copy of the GNU General Public License 15 | # along with Ansible. If not, see . 16 | 17 | # WANT_JSON 18 | # POWERSHELL_COMMON 19 | 20 | $uninstall_native_path = "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall" 21 | $uninstall_wow6432_path = "HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall" 22 | 23 | if ([System.IntPtr]::Size -eq 4) { 24 | 25 | # This is a 32-bit Windows system, so we only check for 32-bit programs, which will be 26 | # at the native registry location. 27 | 28 | [PSObject []]$packages = Get-ChildItem -Path $uninstall_native_path | 29 | Get-ItemProperty | 30 | Select-Object -Property @{Name="name"; Expression={$_."DisplayName"}}, 31 | @{Name="version"; Expression={$_."DisplayVersion"}}, 32 | @{Name="publisher"; Expression={$_."Publisher"}}, 33 | @{Name="arch"; Expression={ "Win32" }} | 34 | Where-Object { $_.name } 35 | 36 | } else { 37 | 38 | # This is a 64-bit Windows system, so we check for 64-bit programs in the native 39 | # registry location, and also for 32-bit programs under Wow6432Node. 40 | 41 | [PSObject []]$packages = Get-ChildItem -Path $uninstall_native_path | 42 | Get-ItemProperty | 43 | Select-Object -Property @{Name="name"; Expression={$_."DisplayName"}}, 44 | @{Name="version"; Expression={$_."DisplayVersion"}}, 45 | @{Name="publisher"; Expression={$_."Publisher"}}, 46 | @{Name="arch"; Expression={ "Win64" }} | 47 | Where-Object { $_.name } 48 | 49 | $packages += Get-ChildItem -Path $uninstall_wow6432_path | 50 | Get-ItemProperty | 51 | Select-Object -Property @{Name="name"; Expression={$_."DisplayName"}}, 52 | @{Name="version"; Expression={$_."DisplayVersion"}}, 53 | @{Name="publisher"; Expression={$_."Publisher"}}, 54 | @{Name="arch"; Expression={ "Win32" }} | 55 | Where-Object { $_.name } 56 | 57 | } 58 | 59 | $result = New-Object psobject @{ 60 | ansible_facts = New-Object psobject @{ 61 | packages = $packages 62 | } 63 | changed = $false 64 | } 65 | 66 | Exit-Json $result; -------------------------------------------------------------------------------- /roles/build_report_azure/templates/report.j2: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Detailed Cloud Automation Report 5 | 6 | 7 | 8 | 9 | 10 | 19 | 20 | 21 | {% include 'header.j2' %} 22 |
23 |
24 |

Ansible Azure Automation Example Report

25 |
26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 65 | 66 | 69 | 70 | 71 | 72 |
Public CloudRegion
36 |
37 | picture of cloud 38 |

Azure

39 |
40 |
41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 |
Azure Client ID{{ lookup('ansible.builtin.env', 'AZURE_CLIENT_ID') }}
Azure Subscription ID{{ lookup('ansible.builtin.env', 'AZURE_SUBSCRIPTION_ID') }}
Azure Tenant{{ lookup('ansible.builtin.env', 'AZURE_TENANT') }}
57 | 58 | 59 | {% include 'ansible.j2' %} 60 |
61 | 62 | 63 | 64 |
67 | {% include 'azure.j2' %} 68 |
73 |

Created with


red hat ansible automation platform logo 74 |

The source code to create this report can be found at https://github.com/ansible-cloud/aws_demos

75 | If you are new to Ansible Automation check out the following links:
76 | Getting Started
77 | Free hands-on workshops
78 | Youtube Videos
79 |

80 |
81 |
82 |
83 | 84 | -------------------------------------------------------------------------------- /roles/build_report_aws/README.md: -------------------------------------------------------------------------------- 1 | build_report_aws 2 | ======== 3 | 4 | Installs Apache and creates a report based on facts from AWS. 5 | 6 | Requirements 7 | ------------ 8 | 9 | Must deploy to Apache server 10 | 11 | Role Variables / Configuration 12 | -------------- 13 | 14 | N/A 15 | 16 | Dependencies 17 | ------------ 18 | 19 | N/A 20 | 21 | Example Playbook 22 | ---------------- 23 | 24 | The role can be used to create an html report on AWS statistics onto an apache server. 25 | 26 | 27 | ``` 28 | --- 29 | - name: Create AWS Detailed Report 30 | hosts: localhost 31 | tasks: 32 | 33 | - name: Get all regions 34 | amazon.aws.aws_region_info: 35 | region: "us-east-2" 36 | register: allregions 37 | 38 | - name: Loop over all ec2 regions 39 | ansible.builtin.include_tasks: 40 | file: retrieve_info.yml 41 | loop: "{{ allregions.regions }}" 42 | loop_control: 43 | label: "{{ item.region_name }}" 44 | 45 | - name: Grab boto version 46 | ansible.builtin.pip: 47 | name: boto3 48 | register: register_boto3_version 49 | check_mode: true 50 | 51 | - name: Grab information about AWS user 52 | amazon.aws.aws_caller_info: 53 | register: whoami 54 | 55 | - name: Save username of AWS user and boto3 version 56 | ansible.builtin.set_fact: 57 | aws_user: '{{ whoami.arn.split("/")[-1] }}' 58 | boto3_version: >- 59 | {{ lookup('pipe', ansible_playbook_python ~ ' -c "import boto3; print(boto3.__version__)"') | default('unknown') }} 60 | 61 | - name: Build the report 62 | ansible.builtin.include_role: 63 | name: shadowman.reports.build_report_aws 64 | apply: 65 | delegate_to: report.shadowman.dev 66 | run_once: true 67 | ``` 68 | 69 | ``` 70 | --- 71 | # retrieve_info.yml 72 | - name: Retrieve vpc information for {{ item.region_name }} 73 | amazon.aws.ec2_vpc_net_info: 74 | region: "{{ item.region_name }}" 75 | register: vpc_info 76 | delegate_to: localhost 77 | 78 | - name: Retrieve info for ec2 instances 79 | amazon.aws.ec2_instance_info: 80 | region: "{{ item.region_name }}" 81 | register: ec2_instance_info 82 | delegate_to: localhost 83 | 84 | - name: Retrieve information about Internet Gateways IGWs 85 | amazon.aws.ec2_vpc_igw_info: 86 | region: "{{ item.region_name }}" 87 | register: igw_info 88 | delegate_to: localhost 89 | 90 | # Dashes are not allowed as Ansible var names so we use underscores _ 91 | - name: Set facts all info for {{ item.region_name }} 92 | ansible.builtin.set_fact: 93 | '{{ item.region_name|replace("-", "_") }}': 94 | vpc_info: '{{ vpc_info }}' 95 | ec2_instance_info: '{{ ec2_instance_info }}' 96 | igw_info: '{{ igw_info }}' 97 | 98 | - name: Set facts all info for {{ item.region_name }} 99 | ansible.builtin.set_fact: 100 | all_ec2_regions: "{{ all_ec2_regions | default([]) + [{item.region_name | replace('-', '_'): hostvars[inventory_hostname][item.region_name | replace('-', '_')]}] }}" 101 | ``` -------------------------------------------------------------------------------- /roles/build_report_azure/templates/azure.j2: -------------------------------------------------------------------------------- 1 | 2 | {% set azure_vars = hostvars["localhost"] %} 3 | {% set real_location = azure_vars.all_regions.response | selectattr('metadata.regionType', 'equalto', "Physical") %} 4 | 5 |
6 | {% for location in real_location %} 7 | {% set running = azure_vars.azure_vms.vms | selectattr('location', 'equalto', location.name) | selectattr('power_state', 'equalto', "running") | length %} 8 | {% set stopped = azure_vars.azure_vms.vms | selectattr('location', 'equalto', location.name) | selectattr('power_state', 'equalto', "stopped") | length %} 9 | {% set total = azure_vars.azure_vms.vms | selectattr('location', 'equalto', location.name) | length %} 10 |
11 |

{{ location.name }} - {{ location["metadata"]["physicalLocation"] | default('unknown') }}
{% if total > 0 %}{% if running > 0 %}
{% endif %}{{ running }} instances running{% if running > 0 %}
{% endif %}
{{ stopped }} stopped ({{ total }} total)
{% endif %}

12 |
13 | {% set region_specific_networks = azure_vars.azure_networks.virtualnetworks | selectattr('location', 'equalto', location.name) %} 14 |

This region contains {{ region_specific_networks | length }} Virtual Network(s)

15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | {% set region_specific_nics = azure_vars.network_interfaces.networkinterfaces | selectattr('location', 'equalto', location.name) %} 27 | {% set nic_names = region_specific_nics | map(attribute='name') | list %} 28 | {% set filtered_vms = [] %} 29 | {% for vm in azure_vars.azure_vms.vms %} 30 | {% if nic_names | intersect(vm['network_interface_names']) %} 31 | {{- filtered_vms.append(vm) -}} 32 | {% endif %} 33 | {% endfor %} 34 | 35 | {% for virtual_network in region_specific_networks %} 36 | {% set virtual_network_specific_nics = region_specific_nics | selectattr('virtual_network.name', 'equalto', virtual_network.name) %} 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | {% endfor %} 47 | 48 |
Virtual Network nameAddress Prefixes SubnetsSubnet DetailsNetwork
Interfaces
Network Interface DetailsVirtual
Machines
{{ virtual_network.name | default("unknown") }}{% for prefix in virtual_network.address_prefixes %}{% endfor %}
{{ prefix }}
{{ virtual_network.subnets | length }}{% for subnet in virtual_network.subnets %}{% endfor %}
{{ subnet.name }}{{ subnet.address_prefix }}
{{ virtual_network_specific_nics | length }}{% for nic in virtual_network_specific_nics %}{% endfor %}
{{ nic.name }}{{ nic.mac_address }}
{{ filtered_vms | length }}
49 |
50 |
51 | {% endfor %} 52 |
53 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Shadowman Reports Collection 2 | 3 | The Ansible Shadowman Reports collection includes a variety of Ansible content to help automate the creation of Linux, Windows, Cloud, Active Directory, and Networking reports. 4 | 5 | 6 | ## Ansible version compatibility 7 | 8 | This collection has been tested against following Ansible versions: **>=2.9.10**. 9 | 10 | Plugins and modules within a collection may be tested with only specific Ansible versions. 11 | A collection may contain metadata that identifies these versions. 12 | PEP440 is the schema used to describe the versions of Ansible. 13 | 14 | 15 | ## Tested with Ansible 16 | 17 | This collection has been tested against RHEL 7, 8, 9, Windows Server 2016, IOS, EOS, VyOS 18 | 19 | 20 | ## External requirements 21 | 22 | 23 | ## Included content 24 | 25 | 26 | 27 | ### Modules 28 | Name | Description 29 | --- | --- 30 | [shadowman.reports.win_scan_packages](https://github.com/shadowman-lab/shadowman.reports/blob/main/docs/shadowman.reports.win_scan_packages_module.rst)|Scans for all packages on a Windows server 31 | [shadowman.reports.win_scan_services](https://github.com/shadowman-lab/shadowman.reports/blob/main/docs/shadowman.reports.win_scan_services_module.rst)|Scans for all services on a Windows server 32 | 33 | 34 | 35 | ## Installing this collection 36 | 37 | You can install the Shadowman Reports collection with the Ansible Galaxy CLI: 38 | 39 | ansible-galaxy collection install shadowman.reports 40 | 41 | You can also include it in a `requirements.yml` file and install it with `ansible-galaxy collection install -r requirements.yml`, using the format: 42 | 43 | ```yaml 44 | --- 45 | collections: 46 | - name: shadowman.reports 47 | ``` 48 | ## Using this collection 49 | 50 | ### Using Shadowman Reports Ansible Collection 51 | 52 | An example for using this collection to scan a Windows host for packages: 53 | 54 | 55 | ```yaml 56 | --- 57 | - name: Scan packages of all Windows hosts 58 | hosts: windows 59 | 60 | tasks: 61 | 62 | - name: "Scan packages (Windows)" 63 | shadowman.reports.win_scan_packages: 64 | 65 | ``` 66 | 67 | 68 | ### Code of Conduct 69 | This collection follows the Ansible project's 70 | [Code of Conduct](https://docs.ansible.com/ansible/devel/community/code_of_conduct.html). 71 | Please read and familiarize yourself with this document. 72 | 73 | ## Roadmap 74 | 75 | 76 | 77 | ## More information 78 | 79 | - [Ansible Collection overview](https://github.com/ansible-collections/overview) 80 | - [Ansible User guide](https://docs.ansible.com/ansible/latest/user_guide/index.html) 81 | - [Ansible Developer guide](https://docs.ansible.com/ansible/latest/dev_guide/index.html) 82 | - [Ansible Community code of conduct](https://docs.ansible.com/ansible/latest/community/code_of_conduct.html) 83 | 84 | ## Licensing 85 | 86 | GNU General Public License v3.0 or later. 87 | 88 | See [LICENSE](https://www.gnu.org/licenses/gpl-3.0.txt) to see the full text. 89 | -------------------------------------------------------------------------------- /roles/build_report_windows_patch/templates/report.j2: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Windows Patch Report 5 | 6 | 7 |
8 |

Ansible Windows Patching Report

9 | 16 |
17 | 18 | 19 |
20 |
21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | {% for windows_host in ansible_play_hosts|sort %} 31 | 32 | 33 | 34 | 47 | 48 | 49 | {% endfor %} 50 | 51 |
HostnameOperating SystemRequired Updates
{{hostvars[windows_host]['inventory_hostname']}}{{hostvars[windows_host]['ansible_distribution']|default("none")}} 35 |
    36 | 37 | {% if hostvars[windows_host].patchresult.updates is defined and hostvars[windows_host].patchresult.found_update_count|int > 0 %} 38 | {% for update in hostvars[windows_host].patchresult.updates %} 39 | {% set updatenum = hostvars[windows_host].patchresult.updates[update] %} 40 |
  • {{updatenum.title}}
  • 41 | {% endfor %} 42 | {% else %} 43 |
  • Compliant
  • 44 | {% endif %} 45 |
46 |
52 |

Created with Ansible on {{hostvars[ansible_play_hosts[0]].ansible_date_time.iso8601}}

53 | 112 | 113 | -------------------------------------------------------------------------------- /roles/build_report_aws/templates/vpc.j2: -------------------------------------------------------------------------------- 1 | 2 |
3 | {% for ec2_region in all_ec2_regions %} 4 | {% for key, value in ec2_region.items() %} 5 | {% set running = value.ec2_instance_info.instances | selectattr('state.name', 'equalto', "running") | length %} 6 | {% set stopped = value.ec2_instance_info.instances | selectattr('state.name', 'equalto', "stopped") | length %} 7 | {% set total = value.ec2_instance_info.instances | length %} 8 |
9 |

{{ key | default('unknown') }}
{% if total > 0 %}{% if running > 0 %}
{% endif %}{{ running }} instances running{% if running > 0 %}
{% endif %}
{{ stopped }} stopped ({{ total }} total)
{% endif %}

10 |
11 |

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 |
21 |

Optimization Opportunities

22 |
{{ nsvpc.total_empty_vpc }} empty VPCs
23 |
24 | {% endif %} 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | {% for vpc in value.vpc_info.vpcs %} 38 | 39 | 40 | 41 | {% set instances_with_vpc = value.ec2_instance_info.instances | selectattr('vpc_id', 'defined') %} 42 | 43 | 44 | 45 | 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 | 52 | {% set ns.igwfound = True %} 53 | {% endif %} 54 | {% endif %} 55 | {% endif %} 56 | {%- endfor -%} 57 | {% if not ns.igwfound %} 58 | 59 | {% endif %} 60 | 61 | {% endfor %} 62 | 63 |
VPC nameVPC idinstances
running
instances
stopped
CIDR blockCIDR block
associations
IGW
{{ vpc.tags['Name'] | default('no name tag') }}{{ vpc.id }}{{ instances_with_vpc | selectattr('vpc_id', 'equalto', vpc.id ) | selectattr('state.name', 'equalto', "running") | length }}{{ instances_with_vpc | selectattr('vpc_id', 'equalto', vpc.id ) | selectattr('state.name', 'equalto', "stopped") | length }}{{ vpc.cidr_block }}{{ vpc.cidr_block_association_set | length | default('0') }}{{ igw['internet_gateway_id'] }}No IGW found
64 |
65 |
66 | {% endfor %} 67 | {% endfor %} 68 |
69 | -------------------------------------------------------------------------------- /roles/build_report_cloud/templates/fullreport.j2: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Cloud Automation Report 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 21 | 22 | 23 |
24 |
25 |
26 | 27 | 33 | 34 |
35 |
36 |
37 |
38 |

Ansible Hybrid Cloud Automation Example Report

39 |
40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 69 | 102 | 103 | 104 |
Public CloudSubscription
50 |
51 |

52 |

53 |
54 |
55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 |
Azure Client ID{{ azure_client | default('unknown') }}
Subscription ID{{ azure_sub_id | default('unknown') }}
67 |
68 |
70 | 71 |
72 |
73 |

{{ azure_sub_id | default('unknown') }}

74 |
75 |

There are {{ vnet_info.virtualnetworks | length }} Azure VNets configured and {{ interface_info.networkinterfaces | length }} network interfaces

76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | {% for vnet in vnet_info.virtualnetworks %} 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | {% endfor %} 95 | 96 |
{{ '%-38s'|format('VNet Name')}}{{ '%-28s'|format('VNet ID') }}{{ '%-14s'|format('Network Interfaces') }}{{ '%-18s'|format('Address Prefixes') }}{{ '%-26s'|format('Subnets') }}
{{ '%-38s'|format(vnet.name) }}{{ '%-28s' | format(vnet.id) }}{{ '%-14s'|format(interface_info.networkinterfaces | selectattr('virtual_network.name', 'equalto', vnet.name ) | length) -}}{{ '%-18s'|format(vnet.address_prefixes[0]) }}{{ '%-26s' | format(vnet.subnets | length | default('0')) }}
97 |
98 |
99 |
100 | 101 |
105 |

Created with


106 |
107 |
108 |
109 | 110 | -------------------------------------------------------------------------------- /roles/build_report_certs/templates/report.j2: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Certificate Report 5 | 6 | 7 |
8 |

Certificate Report

9 | 16 |
17 | 18 | 19 |
20 |
21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | {% for host in ansible_play_hosts|sort %} 34 | {% if hostvars[host]['issuer'] is defined or include_no_cert == 'True' %} 35 | 36 | 37 | 38 | 39 | 40 | 41 | {% if hostvars[host]['expired']|default("false") == true %} 42 | 43 | {% elif hostvars[host]['expire_days']|default("5000") | int < num_days_to_warn | int %} 44 | 45 | {% else %} 46 | 47 | {% endif %} 48 | 49 | {% endif %} 50 | {% endfor %} 51 | 52 |
HostnameOperating SystemOperating System VersionCertificate IssuerCertificate Expiration DateCertificate Days until Expiration
{{hostvars[host]['inventory_hostname']}}{{hostvars[host]['ansible_distribution']|default("none")}}{{hostvars[host]['ansible_distribution_version']|default("none")}}{{hostvars[host]['issuer']|default("none")}}{{hostvars[host]['expiration']|default("none")}}{{hostvars[host]['expire_days']|default("none")}}{{hostvars[host]['expire_days']|default("none")}}{{hostvars[host]['expire_days']|default("0")}}
53 |

Created with Ansible on {{hostvars[ansible_play_hosts[0]].ansible_date_time.iso8601}}

54 | 110 | 111 | -------------------------------------------------------------------------------- /roles/build_report_windows/templates/report.j2: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Ansible Windows Automation Report 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 21 | 60 | 61 | 62 |
63 | {% include 'header.j2' %} 64 |
65 |
66 |

Ansible Windows Automation Report

67 |

68 |

69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | {% for windows_host in ansible_play_hosts|sort %} 79 | 80 | 90 | 91 | 92 | 93 | {% endfor %} 94 | 95 |
Windows DeviceOperating SystemOperating System Kernel Version
81 |
82 |

83 | {{ hostvars[windows_host]['inventory_hostname'].split('.')[0] }}

84 |
85 | {% if detailedreport == 'True' %} 86 | {% include 'packages.j2' %} 87 | {% include 'services.j2' %} 88 | {% endif %} 89 |
{{hostvars[windows_host]['ansible_os_family']|default("none")}}{{hostvars[windows_host]['ansible_distribution']|default("none")}}
96 |

Created with


97 |
98 |
99 |
100 | 101 | 102 | -------------------------------------------------------------------------------- /roles/build_report_network/templates/report.j2: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Ansible Network Automation Report 5 | 6 | 7 | 8 | 9 | 10 | 11 | 20 | 59 | 60 | 61 |
62 | {% include 'header.j2' %} 63 |
64 |
65 |

Ansible Network Automation Report

66 |

67 |

68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | {% for network_switch in ansible_play_hosts|sort %} 79 | 80 | 87 | 90 | 95 | 103 | 104 | 105 | {% endfor %} 106 | 107 |
Network DeviceLayer 1Layer 2Layer 3
81 |
82 |

83 | {{ hostvars[network_switch]['ansible_net_hostname'].split('.')[0] }}

84 |
85 | {% include 'summary.j2' %} 86 |
88 | {% include 'interfaces.j2' %} 89 | 91 | {% include 'vlans.j2' %} 92 | {% include 'lldp_interfaces.j2' %} 93 | {% include 'l2_interfaces.j2' %} 94 | 96 | {% include 'l3_interfaces.j2' %} 97 | {% include 'lacp.j2' %} 98 | {% include 'static.j2' %} 99 | {% include 'bgp.j2' %} 100 | {% include 'bgp_address_family.j2' %} 101 | {% include 'ospf.j2' %} 102 |
108 |

Created with


109 |
110 |
111 |
112 | 113 | 114 | -------------------------------------------------------------------------------- /roles/build_report_linux_patch/templates/report.j2: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Linux Patch Report 5 | 6 | 7 |
8 |

Ansible Linux Patching Report

9 | 16 |
17 | 18 | 19 |
20 |
21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | {% for linux_host in ansible_play_hosts|sort %} 32 | 33 | 34 | 35 | 36 | 55 | 56 | {% endfor %} 57 | 58 |
HostnameOperating SystemOperating System VersionRequired Updates
{{hostvars[linux_host]['inventory_hostname']}}{{hostvars[linux_host]['ansible_os_family']|default("none")}}{{hostvars[linux_host]['ansible_distribution_version']|default("none")}} 37 |
    38 | {% if hostvars[linux_host].patchingresult.changed|default("false",true) == true %} 39 | {% for packagename in hostvars[linux_host].patchingresult.changes.updated|sort %} 40 |
  • {{ packagename[0] }} - {{ packagename[1] }}
  • 41 | {% endfor %} 42 | {% elif hostvars[linux_host].patchingresultdnf.changed|default("false",true) == true %} 43 | {% for packagename in hostvars[linux_host].patchingresultdnf.results|sort %} 44 |
  • {{ packagename }}
  • 45 | {% endfor %} 46 | {% elif hostvars[linux_host].patchingresultdnf.changed is undefined %} 47 |
  • Patching Failed
  • 48 | {% elif hostvars[linux_host].patchingresult.changed is undefined %} 49 |
  • Patching Failed
  • 50 | {% else %} 51 |
  • Compliant
  • 52 | {% endif %} 53 |
54 |
59 |

Created with Ansible on {{hostvars[ansible_play_hosts[0]].ansible_date_time.iso8601}}

60 | 119 | 120 | -------------------------------------------------------------------------------- /roles/build_report_patch/templates/report.j2: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Patch Report 5 | 6 | 7 |
8 |

Ansible Patching Report

9 | 16 |
17 | 18 | 19 |
20 |
21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | {% for vm_host in ansible_play_hosts|sort %} 32 | 33 | 34 | 35 | 36 | 56 | 57 | 58 | {% endfor %} 59 | 60 |
HostnameOperating SystemOperating System VersionRequired Updates
{{hostvars[vm_host]['inventory_hostname']}}{{hostvars[vm_host]['ansible_distribution']|default("none")}}{{hostvars[vm_host]['ansible_distribution_version']|default("none")}} 37 |
    38 | {% if hostvars[vm_host].patchingresult.changed|default("false",true) == true %} 39 | {% for packagename in hostvars[vm_host].patchingresult.changes.updated|sort %} 40 |
  • {{ packagename[0] }} - {{ packagename[1] }}
  • 41 | {% endfor %} 42 | {% elif hostvars[vm_host].patchingresultdnf.changed|default("false",true) == true %} 43 | {% for packagename in hostvars[vm_host].patchingresultdnf.results|sort %} 44 |
  • {{ packagename }}
  • 45 | {% endfor %} 46 | {% elif hostvars[vm_host].patchresult.updates is defined and hostvars[vm_host].patchresult.found_update_count|int > 0 %} 47 | {% for update in hostvars[vm_host].patchresult.updates %} 48 | {% set updatenum = hostvars[vm_host].patchresult.updates[update] %} 49 |
  • {{updatenum.title}}
  • 50 | {% endfor %} 51 | {% else %} 52 |
  • Compliant
  • 53 | {% endif %} 54 |
55 |
61 |

Created with Ansible on {{hostvars[ansible_play_hosts[0]].ansible_date_time.iso8601}}

62 | 121 | 122 | -------------------------------------------------------------------------------- /roles/build_report_linux/templates/report.j2: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Ansible Linux Automation Report 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 21 | 60 | 61 | 62 |
63 | {% include 'header.j2' %} 64 |
65 |
66 |

Ansible Linux Automation Report

67 |

68 |

69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | {% for linux_host in ansible_play_hosts|sort %} 81 | 82 | 92 | 93 | 94 | 95 | 96 | 97 | {% endfor %} 98 | 99 |
Linux DevicePackage ManagerOperating SystemOperating System VersionOperating System Kernel Version
83 |
84 |

85 | {{ hostvars[linux_host]['inventory_hostname'].split('.')[0] }}

86 |
87 | {% if detailedreport == 'True' %} 88 | {% include 'packages.j2' %} 89 | {% include 'services.j2' %} 90 | {% endif %} 91 |
{{hostvars[linux_host]['ansible_pkg_mgr']|default("none")}}{{hostvars[linux_host]['ansible_os_family']|default("none")}}{{hostvars[linux_host]['ansible_distribution_version']|default("none")}}{{hostvars[linux_host]['ansible_kernel']|default("none")}}
100 |

Created with


101 |
102 |
103 |
104 | 105 | 106 | -------------------------------------------------------------------------------- /roles/build_report_cloud/files/css/new.css: -------------------------------------------------------------------------------- 1 | p.hostname { 2 | color: #000000; 3 | font-weight: bolder; 4 | font-size: large; 5 | margin: auto; 6 | width: 50%; 7 | } 8 | 9 | #subtable { 10 | background: #ebebeb; 11 | margin: 0px; 12 | width: 100%; 13 | } 14 | 15 | #subtable tbody tr td { 16 | padding: 5px 5px 5px 5px; 17 | } 18 | 19 | #subtable thead th { 20 | padding: 5px; 21 | } 22 | 23 | * { 24 | -moz-box-sizing: border-box; 25 | -webkit-box-sizing: border-box; 26 | box-sizing: border-box; 27 | font-family: "Open Sans", "Helvetica"; 28 | 29 | } 30 | 31 | a { 32 | color: #ffffff; 33 | } 34 | 35 | p { 36 | color: #ffffff; 37 | } 38 | h1 { 39 | text-align: center; 40 | color: #ffffff; 41 | } 42 | 43 | body { 44 | background:#353a40; 45 | padding: 0px; 46 | margin: 0px; 47 | font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; 48 | } 49 | 50 | table { 51 | border-collapse: separate; 52 | background:#fff; 53 | @include border-radius(5px); 54 | @include box-shadow(0px 0px 5px rgba(0,0,0,0.3)); 55 | } 56 | 57 | .main_net_table { 58 | margin:50px auto; 59 | } 60 | 61 | thead { 62 | @include border-radius(5px); 63 | } 64 | 65 | thead th { 66 | font-size:16px; 67 | font-weight:400; 68 | color:#fff; 69 | @include text-shadow(1px 1px 0px rgba(0,0,0,0.5)); 70 | text-align:left; 71 | padding:20px; 72 | border-top:1px solid #858d99; 73 | background: #353a40; 74 | 75 | &:first-child { 76 | @include border-top-left-radius(5px); 77 | } 78 | 79 | &:last-child { 80 | @include border-top-right-radius(5px); 81 | } 82 | } 83 | 84 | tbody tr td { 85 | font-weight:400; 86 | color:#5f6062; 87 | font-size:13px; 88 | padding:20px 20px 20px 20px; 89 | border-bottom:1px solid #e0e0e0; 90 | } 91 | 92 | tbody tr:nth-child(2n) { 93 | background:#f0f3f5; 94 | } 95 | 96 | tbody tr:last-child td { 97 | border-bottom:none; 98 | &:first-child { 99 | @include border-bottom-left-radius(5px); 100 | } 101 | &:last-child { 102 | @include border-bottom-right-radius(5px); 103 | } 104 | } 105 | 106 | td { 107 | vertical-align: top; 108 | } 109 | 110 | span.highlight { 111 | background-color: yellow; 112 | } 113 | 114 | .expandclass { 115 | color: #5f6062; 116 | } 117 | 118 | .content{ 119 | display:none; 120 | margin: 10px; 121 | } 122 | 123 | header { 124 | width: 100%; 125 | position: initial; 126 | float: initial; 127 | padding: 0; 128 | margin: 0; 129 | border-radius: 0; 130 | height: 88px; 131 | background-color: #171717; 132 | } 133 | 134 | .header-container { 135 | margin: 0 auto; 136 | width: 100%; 137 | height: 100%; 138 | max-width: 1170px; 139 | padding: 0; 140 | float: initial; 141 | display: flex; 142 | align-items: center; 143 | } 144 | 145 | .header-logo { 146 | width: 137px; 147 | border: 0; 148 | margin: 0; 149 | margin-left: 15px; 150 | } 151 | 152 | .header-link { 153 | margin-left: 40px; 154 | text-decoration: none; 155 | cursor: pointer; 156 | text-transform: uppercase; 157 | font-size: 15px; 158 | font-family: 'Red Hat Text'; 159 | font-weight: 500; 160 | } 161 | 162 | .header-link:hover { 163 | text-shadow: 0 0 0.02px white; 164 | text-decoration: none; 165 | } 166 | 167 | table.net_info td { 168 | padding: 5px; 169 | } 170 | 171 | p.expandclass:hover { 172 | text-decoration: underline; 173 | color: #EE0000; 174 | cursor: pointer; 175 | } 176 | 177 | .summary_info { 178 | } 179 | 180 | .ui-state-active, .ui-widget-content .ui-state-active, .ui-widget-header .ui-state-active, a.ui-button:active, .ui-button:active, .ui-button.ui-state-active:hover { 181 | border: 1px solid #5F0000; 182 | background: #EE0000; 183 | } 184 | 185 | div#net_content { 186 | padding: 0px; 187 | height: auto !important; 188 | } 189 | 190 | img.router_image { 191 | vertical-align: middle; 192 | padding: 0px 10px 10px 10px; 193 | width: 50px; 194 | } 195 | 196 | table.net_info { 197 | width: 100%; 198 | } 199 | 200 | p.internal_label { 201 | color: #000000; 202 | } -------------------------------------------------------------------------------- /roles/build_report_linux/files/css/new.css: -------------------------------------------------------------------------------- 1 | p.hostname { 2 | color: #000000; 3 | font-weight: bolder; 4 | font-size: large; 5 | margin: auto; 6 | width: 50%; 7 | } 8 | 9 | #subtable { 10 | background: #ebebeb; 11 | margin: 0px; 12 | width: 100%; 13 | } 14 | 15 | #subtable tbody tr td { 16 | padding: 5px 5px 5px 5px; 17 | } 18 | 19 | #subtable thead th { 20 | padding: 5px; 21 | } 22 | 23 | * { 24 | -moz-box-sizing: border-box; 25 | -webkit-box-sizing: border-box; 26 | box-sizing: border-box; 27 | font-family: "Open Sans", "Helvetica"; 28 | 29 | } 30 | 31 | a { 32 | color: #ffffff; 33 | } 34 | 35 | p { 36 | color: #ffffff; 37 | } 38 | h1 { 39 | text-align: center; 40 | color: #ffffff; 41 | } 42 | 43 | body { 44 | background:#353a40; 45 | padding: 0px; 46 | margin: 0px; 47 | font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; 48 | } 49 | 50 | table { 51 | border-collapse: separate; 52 | background:#fff; 53 | @include border-radius(5px); 54 | @include box-shadow(0px 0px 5px rgba(0,0,0,0.3)); 55 | } 56 | 57 | .main_net_table { 58 | margin:50px auto; 59 | } 60 | 61 | thead { 62 | @include border-radius(5px); 63 | } 64 | 65 | thead th { 66 | font-size:16px; 67 | font-weight:400; 68 | color:#fff; 69 | @include text-shadow(1px 1px 0px rgba(0,0,0,0.5)); 70 | text-align:left; 71 | padding:20px; 72 | border-top:1px solid #858d99; 73 | background: #353a40; 74 | 75 | &:first-child { 76 | @include border-top-left-radius(5px); 77 | } 78 | 79 | &:last-child { 80 | @include border-top-right-radius(5px); 81 | } 82 | } 83 | 84 | tbody tr td { 85 | font-weight:400; 86 | color:#5f6062; 87 | font-size:13px; 88 | padding:20px 20px 20px 20px; 89 | border-bottom:1px solid #e0e0e0; 90 | } 91 | 92 | tbody tr:nth-child(2n) { 93 | background:#f0f3f5; 94 | } 95 | 96 | tbody tr:last-child td { 97 | border-bottom:none; 98 | &:first-child { 99 | @include border-bottom-left-radius(5px); 100 | } 101 | &:last-child { 102 | @include border-bottom-right-radius(5px); 103 | } 104 | } 105 | 106 | td { 107 | vertical-align: top; 108 | } 109 | 110 | span.highlight { 111 | background-color: yellow; 112 | } 113 | 114 | .expandclass { 115 | color: #5f6062; 116 | } 117 | 118 | .content{ 119 | display:none; 120 | margin: 10px; 121 | } 122 | 123 | header { 124 | width: 100%; 125 | position: initial; 126 | float: initial; 127 | padding: 0; 128 | margin: 0; 129 | border-radius: 0; 130 | height: 88px; 131 | background-color: #171717; 132 | } 133 | 134 | .header-container { 135 | margin: 0 auto; 136 | width: 100%; 137 | height: 100%; 138 | max-width: 1170px; 139 | padding: 0; 140 | float: initial; 141 | display: flex; 142 | align-items: center; 143 | } 144 | 145 | .header-logo { 146 | width: 137px; 147 | border: 0; 148 | margin: 0; 149 | margin-left: 15px; 150 | } 151 | 152 | .header-link { 153 | margin-left: 40px; 154 | text-decoration: none; 155 | cursor: pointer; 156 | text-transform: uppercase; 157 | font-size: 15px; 158 | font-family: 'Red Hat Text'; 159 | font-weight: 500; 160 | } 161 | 162 | .header-link:hover { 163 | text-shadow: 0 0 0.02px white; 164 | text-decoration: none; 165 | } 166 | 167 | table.net_info td { 168 | padding: 5px; 169 | } 170 | 171 | p.expandclass:hover { 172 | text-decoration: underline; 173 | color: #EE0000; 174 | cursor: pointer; 175 | } 176 | 177 | .summary_info { 178 | } 179 | 180 | .ui-state-active, .ui-widget-content .ui-state-active, .ui-widget-header .ui-state-active, a.ui-button:active, .ui-button:active, .ui-button.ui-state-active:hover { 181 | border: 1px solid #5F0000; 182 | background: #EE0000; 183 | } 184 | 185 | div#net_content { 186 | padding: 0px; 187 | height: auto !important; 188 | } 189 | 190 | img.router_image { 191 | vertical-align: middle; 192 | padding: 0px 10px 10px 10px; 193 | width: 50px; 194 | } 195 | 196 | table.net_info { 197 | width: 100%; 198 | } 199 | 200 | p.internal_label { 201 | color: #000000; 202 | } -------------------------------------------------------------------------------- /roles/build_report_network/files/css/new.css: -------------------------------------------------------------------------------- 1 | p.hostname { 2 | color: #000000; 3 | font-weight: bolder; 4 | font-size: large; 5 | margin: auto; 6 | width: 50%; 7 | } 8 | 9 | #subtable { 10 | background: #ebebeb; 11 | margin: 0px; 12 | width: 100%; 13 | } 14 | 15 | #subtable tbody tr td { 16 | padding: 5px 5px 5px 5px; 17 | } 18 | 19 | #subtable thead th { 20 | padding: 5px; 21 | } 22 | 23 | * { 24 | -moz-box-sizing: border-box; 25 | -webkit-box-sizing: border-box; 26 | box-sizing: border-box; 27 | font-family: "Open Sans", "Helvetica"; 28 | 29 | } 30 | 31 | a { 32 | color: #ffffff; 33 | } 34 | 35 | p { 36 | color: #ffffff; 37 | } 38 | h1 { 39 | text-align: center; 40 | color: #ffffff; 41 | } 42 | 43 | body { 44 | background:#353a40; 45 | padding: 0px; 46 | margin: 0px; 47 | font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; 48 | } 49 | 50 | table { 51 | border-collapse: separate; 52 | background:#fff; 53 | @include border-radius(5px); 54 | @include box-shadow(0px 0px 5px rgba(0,0,0,0.3)); 55 | } 56 | 57 | .main_net_table { 58 | margin:50px auto; 59 | } 60 | 61 | thead { 62 | @include border-radius(5px); 63 | } 64 | 65 | thead th { 66 | font-size:16px; 67 | font-weight:400; 68 | color:#fff; 69 | @include text-shadow(1px 1px 0px rgba(0,0,0,0.5)); 70 | text-align:left; 71 | padding:20px; 72 | border-top:1px solid #858d99; 73 | background: #353a40; 74 | 75 | &:first-child { 76 | @include border-top-left-radius(5px); 77 | } 78 | 79 | &:last-child { 80 | @include border-top-right-radius(5px); 81 | } 82 | } 83 | 84 | tbody tr td { 85 | font-weight:400; 86 | color:#5f6062; 87 | font-size:13px; 88 | padding:20px 20px 20px 20px; 89 | border-bottom:1px solid #e0e0e0; 90 | } 91 | 92 | tbody tr:nth-child(2n) { 93 | background:#f0f3f5; 94 | } 95 | 96 | tbody tr:last-child td { 97 | border-bottom:none; 98 | &:first-child { 99 | @include border-bottom-left-radius(5px); 100 | } 101 | &:last-child { 102 | @include border-bottom-right-radius(5px); 103 | } 104 | } 105 | 106 | td { 107 | vertical-align: top; 108 | } 109 | 110 | span.highlight { 111 | background-color: yellow; 112 | } 113 | 114 | .expandclass { 115 | color: #5f6062; 116 | } 117 | 118 | .content{ 119 | display:none; 120 | margin: 10px; 121 | } 122 | 123 | header { 124 | width: 100%; 125 | position: initial; 126 | float: initial; 127 | padding: 0; 128 | margin: 0; 129 | border-radius: 0; 130 | height: 88px; 131 | background-color: #171717; 132 | } 133 | 134 | .header-container { 135 | margin: 0 auto; 136 | width: 100%; 137 | height: 100%; 138 | max-width: 1170px; 139 | padding: 0; 140 | float: initial; 141 | display: flex; 142 | align-items: center; 143 | } 144 | 145 | .header-logo { 146 | width: 137px; 147 | border: 0; 148 | margin: 0; 149 | margin-left: 15px; 150 | } 151 | 152 | .header-link { 153 | margin-left: 40px; 154 | text-decoration: none; 155 | cursor: pointer; 156 | text-transform: uppercase; 157 | font-size: 15px; 158 | font-family: 'Red Hat Text'; 159 | font-weight: 500; 160 | } 161 | 162 | .header-link:hover { 163 | text-shadow: 0 0 0.02px white; 164 | text-decoration: none; 165 | } 166 | 167 | table.net_info td { 168 | padding: 5px; 169 | } 170 | 171 | p.expandclass:hover { 172 | text-decoration: underline; 173 | color: #EE0000; 174 | cursor: pointer; 175 | } 176 | 177 | .summary_info { 178 | } 179 | 180 | .ui-state-active, .ui-widget-content .ui-state-active, .ui-widget-header .ui-state-active, a.ui-button:active, .ui-button:active, .ui-button.ui-state-active:hover { 181 | border: 1px solid #5F0000; 182 | background: #EE0000; 183 | } 184 | 185 | div#net_content { 186 | padding: 0px; 187 | height: auto !important; 188 | } 189 | 190 | img.router_image { 191 | vertical-align: middle; 192 | padding: 0px 10px 10px 10px; 193 | width: 50px; 194 | } 195 | 196 | table.net_info { 197 | width: 100%; 198 | } 199 | 200 | p.internal_label { 201 | color: #000000; 202 | } -------------------------------------------------------------------------------- /roles/build_report_windows/files/css/new.css: -------------------------------------------------------------------------------- 1 | p.hostname { 2 | color: #000000; 3 | font-weight: bolder; 4 | font-size: large; 5 | margin: auto; 6 | width: 50%; 7 | } 8 | 9 | #subtable { 10 | background: #ebebeb; 11 | margin: 0px; 12 | width: 100%; 13 | } 14 | 15 | #subtable tbody tr td { 16 | padding: 5px 5px 5px 5px; 17 | } 18 | 19 | #subtable thead th { 20 | padding: 5px; 21 | } 22 | 23 | * { 24 | -moz-box-sizing: border-box; 25 | -webkit-box-sizing: border-box; 26 | box-sizing: border-box; 27 | font-family: "Open Sans", "Helvetica"; 28 | 29 | } 30 | 31 | a { 32 | color: #ffffff; 33 | } 34 | 35 | p { 36 | color: #ffffff; 37 | } 38 | h1 { 39 | text-align: center; 40 | color: #ffffff; 41 | } 42 | 43 | body { 44 | background:#353a40; 45 | padding: 0px; 46 | margin: 0px; 47 | font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; 48 | } 49 | 50 | table { 51 | border-collapse: separate; 52 | background:#fff; 53 | @include border-radius(5px); 54 | @include box-shadow(0px 0px 5px rgba(0,0,0,0.3)); 55 | } 56 | 57 | .main_net_table { 58 | margin:50px auto; 59 | } 60 | 61 | thead { 62 | @include border-radius(5px); 63 | } 64 | 65 | thead th { 66 | font-size:16px; 67 | font-weight:400; 68 | color:#fff; 69 | @include text-shadow(1px 1px 0px rgba(0,0,0,0.5)); 70 | text-align:left; 71 | padding:20px; 72 | border-top:1px solid #858d99; 73 | background: #353a40; 74 | 75 | &:first-child { 76 | @include border-top-left-radius(5px); 77 | } 78 | 79 | &:last-child { 80 | @include border-top-right-radius(5px); 81 | } 82 | } 83 | 84 | tbody tr td { 85 | font-weight:400; 86 | color:#5f6062; 87 | font-size:13px; 88 | padding:20px 20px 20px 20px; 89 | border-bottom:1px solid #e0e0e0; 90 | } 91 | 92 | tbody tr:nth-child(2n) { 93 | background:#f0f3f5; 94 | } 95 | 96 | tbody tr:last-child td { 97 | border-bottom:none; 98 | &:first-child { 99 | @include border-bottom-left-radius(5px); 100 | } 101 | &:last-child { 102 | @include border-bottom-right-radius(5px); 103 | } 104 | } 105 | 106 | td { 107 | vertical-align: top; 108 | } 109 | 110 | span.highlight { 111 | background-color: yellow; 112 | } 113 | 114 | .expandclass { 115 | color: #5f6062; 116 | } 117 | 118 | .content{ 119 | display:none; 120 | margin: 10px; 121 | } 122 | 123 | header { 124 | width: 100%; 125 | position: initial; 126 | float: initial; 127 | padding: 0; 128 | margin: 0; 129 | border-radius: 0; 130 | height: 88px; 131 | background-color: #171717; 132 | } 133 | 134 | .header-container { 135 | margin: 0 auto; 136 | width: 100%; 137 | height: 100%; 138 | max-width: 1170px; 139 | padding: 0; 140 | float: initial; 141 | display: flex; 142 | align-items: center; 143 | } 144 | 145 | .header-logo { 146 | width: 137px; 147 | border: 0; 148 | margin: 0; 149 | margin-left: 15px; 150 | } 151 | 152 | .header-link { 153 | margin-left: 40px; 154 | text-decoration: none; 155 | cursor: pointer; 156 | text-transform: uppercase; 157 | font-size: 15px; 158 | font-family: 'Red Hat Text'; 159 | font-weight: 500; 160 | } 161 | 162 | .header-link:hover { 163 | text-shadow: 0 0 0.02px white; 164 | text-decoration: none; 165 | } 166 | 167 | table.net_info td { 168 | padding: 5px; 169 | } 170 | 171 | p.expandclass:hover { 172 | text-decoration: underline; 173 | color: #EE0000; 174 | cursor: pointer; 175 | } 176 | 177 | .summary_info { 178 | } 179 | 180 | .ui-state-active, .ui-widget-content .ui-state-active, .ui-widget-header .ui-state-active, a.ui-button:active, .ui-button:active, .ui-button.ui-state-active:hover { 181 | border: 1px solid #5F0000; 182 | background: #EE0000; 183 | } 184 | 185 | div#net_content { 186 | padding: 0px; 187 | height: auto !important; 188 | } 189 | 190 | img.router_image { 191 | vertical-align: middle; 192 | padding: 0px 10px 10px 10px; 193 | width: 50px; 194 | } 195 | 196 | table.net_info { 197 | width: 100%; 198 | } 199 | 200 | p.internal_label { 201 | color: #000000; 202 | } -------------------------------------------------------------------------------- /roles/build_report_tags/templates/report.j2: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Tags Report 5 | 6 | 7 |
8 |

Ansible Tags Report

9 | 16 |
17 | 18 | 19 |
20 |
21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | {% if aws_info.results is defined %} 31 | {% for aws_regions in aws_info.results %} 32 | {% if aws_regions.instances is defined %} 33 | {% for aws_host in aws_regions.instances %} 34 | 35 | 36 | 37 | 38 | 39 | {% endfor %} 40 | {% endif %} 41 | {% endfor %} 42 | {% endif %} 43 | {% if azure_info.vms is defined %} 44 | {% for azure_host in azure_info.vms %} 45 | 46 | 47 | 48 | 49 | 50 | {% endfor %} 51 | {% endif %} 52 | {% if rhv_info.ovirt_vms is defined %} 53 | {% for rhv_host in rhv_info.ovirt_vms %} 54 | 55 | 56 | 57 | 58 | 59 | {% endfor %} 60 | {% endif %} 61 | {% if vmware_info.virtual_machines is defined %} 62 | {% for vmware_host in vmware_info.virtual_machines %} 63 | 64 | 65 | 66 | 67 | 68 | {% endfor %} 69 | {% endif %} 70 | 71 |
HostnameTagsHypervisor
{{ aws_host.tags.Name }}{{ aws_host.tags.owner | default('no owner') }},{{ aws_host.tags.env | default('no environment') }},{{ aws_host.tags.operating_system | default('no operating system') }}AWS
{{ azure_host.name }}{{ azure_host.tags.owner | default('no owner') }},{{ azure_host.tags.environment | default('no environment') }},{{ azure_host.tags.operating_system | default('no operating system') }}Azure
{{ rhv_host.name }}{{ rhv_host | json_query('tags[*].name') | join(',') | default('no tags') }}RHV
{{ vmware_host.guest_name }}{{ vmware_host | json_query('tags[*].name') | join(',') | default('no tags') }}VMWare
72 |

Created with Ansible

73 | 132 | 133 | -------------------------------------------------------------------------------- /roles/build_report_aws/files/redhat-ansible-logo.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 9 | Logo-Red_Hat-Ansible_Automation_Platform-A-Reverse-RGB 10 | 12 | 14 | 18 | 21 | 24 | 25 | 28 | 33 | 35 | 48 | 49 | -------------------------------------------------------------------------------- /roles/build_report_azure/files/redhat-ansible-logo.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 9 | Logo-Red_Hat-Ansible_Automation_Platform-A-Reverse-RGB 10 | 12 | 14 | 18 | 21 | 24 | 25 | 28 | 33 | 35 | 48 | 49 | -------------------------------------------------------------------------------- /roles/build_report_cloud/files/redhat-ansible-logo.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 9 | Logo-Red_Hat-Ansible_Automation_Platform-A-Reverse-RGB 10 | 12 | 14 | 18 | 21 | 24 | 25 | 28 | 33 | 35 | 48 | 49 | -------------------------------------------------------------------------------- /roles/build_report_google/files/redhat-ansible-logo.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 9 | Logo-Red_Hat-Ansible_Automation_Platform-A-Reverse-RGB 10 | 12 | 14 | 18 | 21 | 24 | 25 | 28 | 33 | 35 | 48 | 49 | --------------------------------------------------------------------------------