Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class mysql-server::installation {
- ...
- notify => Exec["Reset the root password"],
- ...
- }
- class mysql-server::service {
- ...
- exec {
- "Reset the root password":
- command => "/usr/bin/mysqladmin -u root password \"...\"",
- cwd => "/var/lib/mysql",
- onlyif => "/usr/bin/mysql -u root -e ''",
- refreshonly => true,
- require => Service["mysql-server"],
- user => "mysql",
- }
- }
Add Comment
Please, Sign In to add comment