option creates broken on Solaris10

Hi,

Running the script module with the option “creates” is broken (at least since 2.3):
/bin/sh on Solaris10 is not POSIX compliant and the “test” command does not have the option “-e”, therefore the return code is always not zero and so the script is executed every time instead of only the first time.

I could set “executable=/bin/bash” in ansible.cfg but I don’t want to change the default for all my platforms, only for Solaris. But I can’t set ansible_shell_executable via group_vars, only in my inventory file for each host, which is also not an elegant way…

IMHO it would be best to add also the option “executable” to the script module as we already have in shell module.

Or does somebody know a better workaround than to use a task with stat and then put a when: stat.exists == false to my script task?

But I can't set ansible_shell_executable via group_vars, only in my inventory file for each host, which is also not an elegant way...

this is not a known limitation and should be the preferred way to deal
with this.