cleaned up linting and added AAP on Code ready
This commit is contained in:
3
old-demo-repository/roles/developer_report/README.md
Normal file
3
old-demo-repository/roles/developer_report/README.md
Normal file
@@ -0,0 +1,3 @@
|
||||
# Developer Report
|
||||
|
||||
This Ansible Role has a README.md coming soon.
|
||||
19
old-demo-repository/roles/developer_report/meta/main.yml
Normal file
19
old-demo-repository/roles/developer_report/meta/main.yml
Normal 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: []
|
||||
10
old-demo-repository/roles/developer_report/tasks/main.yml
Normal file
10
old-demo-repository/roles/developer_report/tasks/main.yml
Normal 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"
|
||||
@@ -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>
|
||||
Reference in New Issue
Block a user