如何使用salt状态设置root密码

Tom*_*far 6 salt-stack

I want to set strong password for mysql root user. But there is a egg-hen problem. I have empty server. I salt it. The root password is empty (by default after install).

If I use

root: 
  mysql_user.present:
  - name: root
  - password: $ecur3h4x0r
  - host: %
Run Code Online (Sandbox Code Playgroud)

Then I would not be able to call any other mysql states because they would need the password. But the next time I do highstate this call would not work, because the state tries to connect with empty password.

Uta*_*ave 4

是的,我们将添加“default_user”和“default_pass”设置,以便您可以处理这种情况。应该是0.17.0