The following script is suppose to to check to see if Network Manager is 
running.  The report status section is not working as I would expect:

---

- hosts: '{{ target }}'
  sudo: yes
  gather_facts: yes
  tasks:
    - name: Network Manager Running
      shell: systemctl status NetworkManager
      when: ansible_os_family == "RedHat" and 
ansible_distribution_major_version == "7"
      register: service_NetworkManager_status

    - name: Report status
      shell:  /bin/echo  {{ ansbile_hostname }} Network Manager is running
      when: service_NetworkManager_status == True
~                                                    

Any help would be much appreciated.

-- 
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/520d58bd-29f6-4897-838e-4b66b44a30e2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to