On 16/09/16 05:03, John.1209 wrote:
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: yesgather_facts: yestasks:- name: Network Manager Runningshell: systemctl status NetworkManagerwhen: ansible_os_family == "RedHat" and ansible_distribution_major_version == "7"register: service_NetworkManager_status
- name: Report statusshell: /bin/echo {{ ansbile_hostname }} Network Manager is runningwhen: 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 ansible-proje...@googlegroups.com.
To post to this group, send email to ansible...@googlegroups.com.
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.