When installing zookeeper it gets (re)started twice, as enabling the service also starts it.
After the role finished the handler also (re)starts the service again.
By removing the optional (when enabled is used) state parameter it does not start at this at this task (but when the role finished), preventing (re)starting twice.
When installing zookeeper it gets (re)started twice, as enabling the service also starts it. After the role finished the handler also (re)starts the service again.
By removing the optional (when
enabled
is used)state
parameter it does not start at this at this task (but when the role finished), preventing (re)starting twice.