depends: |
|
---|---|
configuration: | See salt.modules.mysql for setup instructions. |
frank:
mysql_user.present:
- host: localhost
- password: bobcat
New in version 0.16.2: Authentication overrides have been added.
The MySQL authentication information specified in the minion config file can be overidden in states using the following arguments: connection_host, connection_port, connection_user, connection_pass, connection_db, connection_unix_socket, connection_default_file and connection_charset.
frank:
mysql_user.present:
- host: localhost
- password: "bob@cat"
- connection_user: someuser
- connection_pass: somepass
- connection_charset: utf8
- saltenv:
- LC_ALL: "en_US.utf8"
Ensure that the named user is absent
Ensure that the named user is present with the specified properties. A passwordless user can be configured by omitting password and password_hash, and setting allow_passwordless to True.
The password in hashed form. Be sure to quote the password because YAML doesn't like the *. A password hash can be obtained from the mysql command-line client like so:
mysql> SELECT PASSWORD('mypass');
+-------------------------------------------+
| PASSWORD('mypass') |
+-------------------------------------------+
| *6C8989366EAF75BB670AD8EA7A7FC1176A95CEF4 |
+-------------------------------------------+
1 row in set (0.00 sec)
Note
The allow_passwordless option will be available in version 0.16.2.
Current Salt release: 2014.1.6
Docs for previous releases on salt.rtfd.org.