I am trying to create a playbook that will see if "/etc/vmware-tools/services.sh"
is running if not running then start.
I have tried command and shell but I can't figure the syntax
for a conditional.
--- # VMWARE_TOOLS_NOT_RUNNING
- hosts: redhat-vm-guest
user: ansible-user
become: true
become_user: root
connection: ssh
gather_facts: false
tasks:
- name: check vmware tools is running
command: /etc/vmware-tools/services.sh status
register: status
- name: print status
debug:
msg: "{{ status.stdout }}