Re: [ansible-project] Re: don't print statement if "command not found" and compare variable value with list of values

2018-11-16 Thread Dan Linder
Correction to my previous email: You *COULD* run a play right before it that registers the full path of `systemctl` found on the system (maybe use `shell: which systemctl`), but that is not a stable method in some cases. I suggest using `systemd:` with the OS version check if needed. On Fri,

[ansible-project] Re: don't print statement if "command not found" and compare variable value with list of values

2018-11-16 Thread dan
I'd suggest not using the `shell:` module, instead use the `systemd:` module. Then setup the `when:` clause with a third that only executes this play on OS versions that have `systemctl` (e.g. RHEL 7+, etc). You run a play right before it that registers the full path of `systemctl` found on