Hi All,

I am trying to prepare Ansible scripts to check remote hosts for certain 
things like - OS version, free disk space etc. I am able to create tasks 
for each of this check as Ansible already have a great support for that, 
but i am stuck at a place on how to create a final report kind of thing for 
all tasks. I have multiple ways to do this:

*Either, simple print the outcome of checking tasks*

    - name: Make drive is present
      win_stat: path="{{path}}"
      register: drive
    
    - debug: var=drive

Problem with this approach is that the actual reporting is lost in between 
all log data of Ansible task execution.

*Let a task fail at the point where the check fails*

    - fail: msg="OS version mismatch"
      when: '"Windows Server 2012 R2" not in ansible_os_name'

Problem in this approach is that it will not be a exact reporting of all 
checks.


So, does anyone has an idea how i can generate a report in the end after 
collecting output of multiple commands ?

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/711d3c37-a584-452a-89ca-c58945adbbd1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to