Article 5M0D3 Ansible Tower playbook displays too much info

Ansible Tower playbook displays too much info

by
mramirez81
from LinuxQuestions.org on (#5M0D3)
I have an Ansible playbook below that simply checks if the firewalld service is running. We have developers in our test environment who love to shut it off. Mgmt policy doesn't let us restrict this, but security wants firewall running. Regardless, I set up a notification in Tower to send the output of the template, which runs every Monday at noon, and the output looks like this. I go through the email and find the "skipped": 1 entries, which means the firewalld is not running. But I'd like to get the output of ONLY the servers that do not have the service running. Don't know if this is a change in the notification or the playbook?

Playbook:

---
- hosts: all
tasks:
- name: check if firewalld is running
command: systemctl status firewalld
args:
warn: false

Output:

"hosts": {
"CDV-SERVER1": {
"failed": false,
"changed": 0,
"dark": 0,
"failures": 0,
"ok": 3,
"processed": 1,
"skipped": 0,
"rescued": 0,
"ignored": 0
},
"CUV-SERVER2": {
"failed": false,
"changed": 0,
"dark": 0,
"failures": 0,
"ok": 3,
"processed": 1,
"skipped": 0,
"rescued": 0,
"ignored": 0
},latest?d=yIl2AUoC8zA latest?i=DDY0P_zqOTM:OAGd71EtPy4:F7zBnMy latest?i=DDY0P_zqOTM:OAGd71EtPy4:V_sGLiP latest?d=qj6IDK7rITs latest?i=DDY0P_zqOTM:OAGd71EtPy4:gIN9vFwDDY0P_zqOTM
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments