Closed BrianSidebotham closed 3 years ago
I also confirm this bug. @BrianSidebotham : Any advice to success on one pass ?
That portion of the code is from around 5 years ago, so it's going to be tough getting feedback from the original author.
We need someone to make some time to dig into this to figure out what's going on.
It looks like for some reason the onlyif condition doesn't work?
The way this is set up is that there's three ways to configure the salt user. The state tries all of them in this order:
The state checks in the onlyif condition if the respective user has access to the database and only if that's the case, executes the state.
The reason behind the /bin/true
is that the salt-user
state needs to override the mysql_root_password
state from the server.sls
file (which uses cmd.run
to configure the root password). But with the salt-user state we want to configure it using mysql_user.present
.
:tada: This issue has been resolved in version 0.55.1 :tada:
The release is available on GitHub release
Your semantic-release bot :package::rocket:
Describe the bug
When running
state.apply
on RedHat with asalt-user
androot_password
Why on RedHat in
salt-user.sls
is there this snippet of code?Results of state.apply:
On a second pass everything works as expected.
Setup
Pillar data for this
Steps to reproduce the bug
Expected behaviour
The mysql state to run cleanly on the first state.apply without requiring a second.
Versions report
salt 2019.2.0
Additional context
OS is CentOS 7
Optional: How can this template be improved?