Hello All,
I wanted to create two two MySQL database with same user credential using Puppet-MySQL. How can I achieve this? Please find my script below.
class mysql::vsdatabase {
include mysql
mysql::db { 'vidispine':
user => 'user',
password => 'user123',
host => 'db.<hostname>.com',
}
}
How can I add another database here with same credential.(If I create different Class with different database and same credential I am getting below error.
root@demo:/mnt# puppet agent -t
info: Retrieving plugin
info: Loading facts in /var/opt/lib/pe-puppet/lib/facter/concat_basedir.rb
info: Loading facts in /var/opt/lib/pe-puppet/lib/facter/puppet_vardir.rb
info: Loading facts in /var/opt/lib/pe-puppet/lib/facter/root_home.rb
info: Loading facts in /var/opt/lib/pe-puppet/lib/facter/iptables.rb
info: Loading facts in /var/opt/lib/pe-puppet/lib/facter/pe_version.rb
info: Loading facts in /var/opt/lib/pe-puppet/lib/facter/custom_auth_conf.rb
info: Loading facts in /var/opt/lib/pe-puppet/lib/facter/facter_dot_d.rb
err: Could not retrieve catalog from remote server: Error 400 on SERVER: Duplicate declaration: Database_user[
gxu...@db.demo.com] is already declared in file /etc/puppetlabs/puppet/modules/mysql/manifests/db.pp at line 62; cannot redeclare at /etc/puppetlabs/puppet/modules/mysql/manifests/db.pp:62 on node demo
warning: Not using cache on failed catalog
err: Could not retrieve catalog; skipping run
)
Thanks,
Jithin Xavier