Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Create /root/.my.cnf even when root passwd is not managed #125

Merged
merged 1 commit into from

4 participants

@bodepd

When the root password is not managed, it causes mysql to
fail b/c it does not create the /root/.my.cnf file (which causes
all mysql commands from the provider to fail)

@bodepd bodepd Create /root/.my.cnf even when root passwd is not managed
When the root password is not managed, it causes mysql to
fail b/c it does not create the /root/.my.cnf file (which causes
all mysql commands from the provider to fail)
765b5c2
@ryanycoleman ryanycoleman merged commit 5a167c9 into puppetlabs:master
@alombarte

I updated my submodule to this version and Mysql fails:

Could not find dependency Exec[set_mysql_rootpw] for File[/root/.my.cnf] at /tmp/vagrant-puppet/modules-0/mysql/manifests/config.pp:123
@hunner
Owner

@alombarte Thanks so much for the report! Crowd-sourcing at its best :). It looks like #126 may address this.

@alombarte

No, thank you! It works and the /root/.my.cnf is created correctly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Oct 13, 2012
  1. @bodepd

    Create /root/.my.cnf even when root passwd is not managed

    bodepd authored
    When the root password is not managed, it causes mysql to
    fail b/c it does not create the /root/.my.cnf file (which causes
    all mysql commands from the provider to fail)
This page is out of date. Refresh to see the latest.
Showing with 6 additions and 1 deletion.
  1. +5 −0 manifests/config.pp
  2. +1 −1  spec/classes/mysql_config_spec.rb
View
5 manifests/config.pp
@@ -116,6 +116,11 @@
require => Exec['set_mysql_rootpw'],
}
}
+ } else {
+ file { '/root/.my.cnf':
+ ensure => present,
+ require => Exec['set_mysql_rootpw'],
+ }
}
file { '/etc/mysql':
View
2  spec/classes/mysql_config_spec.rb
@@ -130,7 +130,7 @@
it { should_not contain_exec('set_mysql_rootpw') }
- it { should_not contain_file('/root/.my.cnf')}
+ it { should contain_file('/root/.my.cnf')}
it { should contain_file('/etc/mysql').with(
'owner' => 'root',
Something went wrong with that request. Please try again.