From 765afe4f613d0c007e653d73268de374b07a76af Mon Sep 17 00:00:00 2001 From: mh Date: Wed, 18 Dec 2013 13:35:20 +0100 Subject: [PATCH 1/2] Fix #321 - root_user should be setup before configuring backup user Otherwise puppet might try to setup the backup user even before the service is running and will fail. --- manifests/server/backup.pp | 2 +- spec/classes/mysql_server_backup_spec.rb | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/manifests/server/backup.pp b/manifests/server/backup.pp index b88425c..df9d00f 100644 --- a/manifests/server/backup.pp +++ b/manifests/server/backup.pp @@ -19,7 +19,7 @@ class mysql::server::backup ( ensure => $ensure, password_hash => mysql_password($backuppassword), provider => 'mysql', - require => Class['mysql::server::config'], + require => Class['mysql::server::root_password'], } mysql_grant { "${backupuser}@localhost/*.*": diff --git a/spec/classes/mysql_server_backup_spec.rb b/spec/classes/mysql_server_backup_spec.rb index 684b2b9..c911031 100644 --- a/spec/classes/mysql_server_backup_spec.rb +++ b/spec/classes/mysql_server_backup_spec.rb @@ -13,7 +13,9 @@ describe 'mysql::server::backup' do context 'standard conditions' do let(:params) { default_params } - it { should contain_mysql_user('testuser@localhost')} + it { should contain_mysql_user('testuser@localhost').with( + :require => 'Class[Mysql::Server::Root_password]' + )} it { should contain_mysql_grant('testuser@localhost/*.*').with( :privileges => ["SELECT", "RELOAD", "LOCK TABLES", "SHOW VIEW"] From c57aa23e6fcf881c4a335ab0d706cad6d932cbe7 Mon Sep 17 00:00:00 2001 From: mh Date: Wed, 18 Dec 2013 13:36:49 +0100 Subject: [PATCH 2/2] Use https url to make puppet-librarian more proxy-friendly For people in restricted networks it's quite common to not be able to use git:// urls, but https-urls work through proxies. --- .fixtures.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.fixtures.yml b/.fixtures.yml index cecf6f5..5631e2a 100644 --- a/.fixtures.yml +++ b/.fixtures.yml @@ -1,5 +1,5 @@ fixtures: repositories: - "stdlib": "git://github.com/puppetlabs/puppetlabs-stdlib" + "stdlib": "https://github.com/puppetlabs/puppetlabs-stdlib" symlinks: "mysql": "#{source_dir}"