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>
</thead>
<tbody>
{% for linux_host in groups['tag_Insights']|sort %}
{% for linux_host in ansible_play_hosts |sort %}
<tr>
<td class="summary_info">
<div id="hostname">

View File

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

View File

@@ -1,13 +1,31 @@
---
- hosts: "{{ 'reports' | default(node1) }}"
- hosts: "{{ HOSTS }}"
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:
name: httpd
state: latest
- service:
name: httpd
state: started
- 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