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:
ConditionPathExists=/etc/multipath.conf was not met
This is likely nothing to do with Ansible. You’re installing a multipath package, enabling a service, the service is failing to start automatically because it doesn’t have any valid config. You should see the same problem if you perform the same steps manually. Figure out your manual process first, then automate it.
Either:
Include a templated /etc/multipath.conf config before enabling/starting the systemd service
Run something like mpathconf --enable to create a default config
Override/replace the Condition in the systemd unit file (probably a bad idea).
I’d recommend looking at having your role or playbook drop in a sensible, templated configuration personally.
Baking a static file into an ISO will almost certainly cause future pain unless you only ever deploy one hardware and storage combination with absolutely zero variation?