cleaned up linting and added AAP on Code ready

This commit is contained in:
chadmf
2021-12-06 16:01:14 -06:00
parent a12658cbcc
commit 12f51112ab
135 changed files with 724 additions and 403 deletions

View File

@@ -0,0 +1,3 @@
# Developer Report
This Ansible Role has a README.md coming soon.

View File

@@ -0,0 +1,19 @@
---
galaxy_info:
role_name: developer_report
author: Sean Cavanaugh
description: This role create an HTML report using Ansible Facts
company: Red Hat
platforms:
- name: EL
versions:
- 8
- 7
license: GPL-3.0-or-later
min_ansible_version: 2.9
galaxy_tags: []
dependencies: []

View File

@@ -0,0 +1,10 @@
---
- name: create HTML report
become: true
template:
src: report.j2
dest: "{{ file_path }}"
- name: DISPLAY LINK TO INVENTORY REPORT
debug:
msg: "Please go to http://{{ ansible_host }}/report"

View File

@@ -0,0 +1,37 @@
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="css/main.css">
</head>
<h1>Developer Report</h1>
<body>
<table>
<thead>
<tr>
<th>Hostname</th>
<th>Operating System</th>
<th>PATH</th>
<th>Kernel</th>
<th>Python Version</th>
<th>Package Manager</th>
<th>System Date Time</td>
</tr>
</thead>
<tbody>
{% for linux_node in groups['all'] %}
<tr>
<td>{{ hostvars[linux_node]['ansible_hostname'] }}</td>
<td>{{ hostvars[linux_node]['ansible_distribution'] }} {{hostvars[linux_node]['ansible_distribution_version']}}</td>
<td>{{ hostvars[linux_node]['ansible_env']['PATH'] }}</td>
<td>{{ hostvars[linux_node]['ansible_kernel'] }}</td>
<td>{{ hostvars[linux_node]['ansible_python_version'] }}</td>
<td>{{ hostvars[linux_node]['ansible_pkg_mgr'] }}</td>
<td>{{ hostvars[linux_node]['ansible_date_time']['date'] }}</td>
</tr>
{% endfor %}
</tbody>
</table>
</body>
</html>