Applying your patch does not solve my problem. It still hangs. )-(
Your last “when:” is wrong.
when: ‘not i_am_master’
A quoted when condition that contains no jinja mustaches is just a string, which is always true. You want
when: not i_am_master
I’m missing a clear definition here: Where ends a simple expression and where start jinja ‚mustaches‘ ?
Some examples:
when: x > a or (y and z)
when: " DEBUG is defined "
when: “i.replication_type == ‘p_dynamic’”
when: “(i_am_master is defined and i_am_master) or i.replication_type == ‘l_master’”
when: “sdt.stat.exists and (i.replication_type.startswith(‘l’) or i.replication_type == ‘p_master’)”
the 'hanging' was irrespective of the bad conditional, that would only
condition execution or not.
The reason it is hanging is probably due to the service itself, for
that you need to examine the process on the host, likely culprit: the
service is prompting for a response
It is not super easy to diagnose a hanging module. I wrote up some instructions using gdb a few weeks back that may help in figuring out why the module is hanging:
Most often, when a process like this hangs, it is often due to the underlying command asking for some input, that the module is not designed to handle. Or the service is just taking a long time to stop for some reason.
You are incorrect. Unquoted scalars and quoted scalars are just different YAML representations of the same data; once it’s parsed these two are completely identical. You have to have two levels of quotes (the YAML quotes and a quoted string as the Jinja expression) in order for it to be treated as always true: