dev/provisioning/modules/mysql/examples/mysql_user.pp
author ymh <ymh.work@gmail.com>
Thu, 03 Nov 2016 09:44:11 +0100
changeset 390 f4fed295115b
parent 28 b0b56e0f8c7f
permissions -rw-r--r--
put virtualenv activation during build in comment. That means that for the moment the build machine must be provisionned beforehand, or ansible must be available globally

$mysql_root_pw = 'password'

class { 'mysql::server':
  root_password => 'password',
}

mysql_user{ 'redmine@localhost':
  ensure        => present,
  password_hash => mysql_password('redmine'),
  require       => Class['mysql::server'],
}

mysql_user{ 'dan@localhost':
  ensure        => present,
  password_hash => mysql_password('blah')
}

mysql_user{ 'dan@%':
  ensure        => present,
  password_hash => mysql_password('blah'),
}

mysql_user{ 'socketplugin@%':
  ensure => present,
  plugin => 'unix_socket',
}

mysql_user{ 'socketplugin@%':
  ensure        => present,
  password_hash => mysql_password('blah'),
  plugin        => 'mysql_native_password',
}