update playbook

This commit is contained in:
willtome
2022-03-23 14:47:26 -04:00
parent 4653d7d9ca
commit e7a72c1a2f
3 changed files with 22 additions and 4 deletions

View File

@@ -77,7 +77,7 @@ collapsible: true
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
{% for linux_host in groups['tag_Insights']|sort %} {% for linux_host in ansible_play_hosts |sort %}
<tr> <tr>
<td class="summary_info"> <td class="summary_info">
<div id="hostname"> <div id="hostname">

View File

@@ -28,7 +28,7 @@
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
{% for linux_host in groups['tag_RHEL']|sort %} {% for linux_host in ansible_play_hosts |sort %}
<tr> <tr>
<td>{{hostvars[linux_host]['inventory_hostname']}}</td> <td>{{hostvars[linux_host]['inventory_hostname']}}</td>
<td>{{hostvars[linux_host]['ansible_os_family']|default("none")}}</td> <td>{{hostvars[linux_host]['ansible_os_family']|default("none")}}</td>

View File

@@ -1,9 +1,22 @@
--- ---
- hosts: "{{ 'reports' | default(node1) }}" - hosts: "{{ HOSTS }}"
tasks: tasks:
- name: Ensure Unix/Linux platforms only
assert:
that: ansible_os_family != "Windows"
- name: Scan packages (Unix/Linux)
demo.patching.scan_packages:
os_family: '{{ ansible_os_family }}'
- name: Scan services (Unix/Linux)
demo.patching.scan_services:
block:
- yum: - yum:
name: httpd name: httpd
state: latest
- service: - service:
name: httpd name: httpd
@@ -11,3 +24,8 @@
- include_role: - include_role:
name: demo.patching.build_report_linux name: demo.patching.build_report_linux
- include_role:
name: demo.patching.build_report_linux_patch
delegate_to: report_servers
run_once: yes