hi,
 
the syntax of your TASK sems not to match the docs for the service module 
https://docs.ansible.com/ansible/latest/collections/ansible/builtin/service_module.html#ansible-collections-ansible-builtin-service-module.
 Would something like ...
 

- name: Enable service httpd, and not touch the state
ansible.builtin.service:
name: multipathd
state: started
enabled: true

... work?


> On 10/18/2023 5:33 AM CEST Prady A <[email protected]> wrote:
>  
>  
> Hi All..
>  
> I ve a very 2 very basic task of enabling multipath.
> The 2 task is failing since the first one is not enabling. But in ansible job 
> it is showing as changed but when I checked multipath service in system it is 
> showing as Below: 
>  
> Active: inactive(dead)
> Condition: start condition failed
>                    |- ConditionPathExists=/etc/multipath.conf was not met 
>  
> Tasks
> ———-
> - name: confirm multipathd is enabled 
>         service: multipathd
>         state: started
>         enable: yes
>  
> - name: check default polling interval
>          shell: multipathd list config | awk ‘/defaults {/,/}’|grep -w 
> polling_interval
>           register: polling_interval
>           changed_when: false
>  
> Please suggest why ansible not able to enable multipath service correctly..
>  
> Regards 
>  
> 

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/1998953809.39642.1697605729025%40office.mailbox.org.

Reply via email to