Skip to content
Snippets Groups Projects
Commit 0a2b5961 authored by Fabien Combernous's avatar Fabien Combernous
Browse files

Merge branch '15-fix-plugins-are-installed-but-not-activated' into 'master'

Resolve "fix plugins are installed but not activated"

Closes #15

See merge request !16
parents 8b042581 6ea540f1
No related branches found
Tags 1.3.2
1 merge request!16Resolve "fix plugins are installed but not activated"
......@@ -9,13 +9,13 @@ All notable changes to this project will be documented in this file.
**Bugfixes**
* #5 Permit to modify hour of update for external_fact.
* #15 Fix plugins are installed but not activated.
* #16 Set `default_locale` to `en_US`.
* #17 In README add subtitles for different examples of usage.
**Known Issues**
* #1 Fix attribute ensure set to latest from scratch with resources management.
* #15 Fix plugins are installed but not activated.
* #1 Fix resources attribute ensure set to latest from scratch.
## Release 1.0.3
......@@ -45,7 +45,7 @@ All notable changes to this project will be documented in this file.
**Known Issues**
* #1 Fix attribute ensure set to latest from scratch with resources management.
* #1 Fix resources attribute ensure set to latest from scratch.
* #5 Permit to modify hour of update for external_fact.
## Release 1.0.1
......@@ -59,7 +59,7 @@ All notable changes to this project will be documented in this file.
**Known Issues**
* #1 Fix attribute ensure set to latest from scratch with resources management.
* #1 Fix resources attribute ensure set to latest from scratch.
* #5 Permit to modify hour of update for external_fact.
## Release 1.0.0
......@@ -72,7 +72,7 @@ All notable changes to this project will be documented in this file.
**Known Issues**
* #1 Fix attribute ensure set to latest from scratch with resources management.
* #1 Fix resources attribute ensure set to latest from scratch.
* #5 Permit to modify hour of update for external_fact.
## Release 0.2.0
......@@ -87,5 +87,5 @@ All notable changes to this project will be documented in this file.
**Known Issues**
* #1 Fix attribute ensure set to latest from scratch with resources management.
* #1 Fix resources attribute ensure set to latest from scratch.
* #5 Permit to modify hour of update for external_fact.
......@@ -47,7 +47,7 @@ class wordpress::resource (
command => "${wpcli_bin} --allow-root --path=${_wp_root} ${_wp_resource_type} activate ${_wp_resource_name}",
onlyif => [
"${wpcli_bin} --allow-root --path=${_wp_root} ${_wp_resource_type} is-installed ${_wp_resource_name}",
"${wpcli_bin} --allow-root --format=csv --path=${_wp_root} --fields=name,status theme list | grep -qP '^${_wp_resource_name},inactive'",
"${wpcli_bin} --allow-root --format=csv --path=${_wp_root} --fields=name,status ${_wp_resource_type} list | grep -qP '^${_wp_resource_name},inactive'",
] ,
user => $_owner,
notify => Exec['update external fact wordpress'],
......
......@@ -170,33 +170,24 @@ describe 'wordpress class' do
its(:stdout) { should match /.*hola this wordpress instance is installed by puppet.*/ }
end
describe file("#{$wp_root}/wp-content/plugins/akismet") do
it { should be_directory }
it { should be_owned_by 'wp' }
it { should be_grouped_into 'wp' }
it { should be_mode 755 }
describe command("/usr/local/bin/wp --allow-root --format=csv --path=#{$wp_root} --fields=name,status plugin list") do
its(:stdout) { should match /.*akismet,active.*/ }
end
describe file("#{$wp_root}/wp-content/plugins/wp-piwik") do
it { should be_directory }
it { should be_owned_by 'wp' }
it { should be_grouped_into 'wp' }
it { should be_mode 755 }
describe command("/usr/local/bin/wp --allow-root --format=csv --path=#{$wp_root} --fields=name,status plugin list") do
its(:stdout) { should match /.*wp-piwik,active.*/ }
end
describe file("#{$wp_root}/wp-content/plugins/hello.php") do
it { should_not exist }
describe command("/usr/local/bin/wp --allow-root --format=csv --path=#{$wp_root} --fields=name,status plugin list") do
its(:stdout) { should_not match /.*hello,.*/ }
end
describe file("#{$wp_root}/wp-content/themes/twentyseventeen") do
it { should be_directory }
it { should be_owned_by 'wp' }
it { should be_grouped_into 'wp' }
it { should be_mode 755 }
describe command("/usr/local/bin/wp --allow-root --format=csv --path=#{$wp_root} --fields=name,status theme list") do
its(:stdout) { should match /.*twentyseventeen,active.*/ }
end
describe file("#{$wp_root}/wp-content/themes/twentysixteen") do
it { should_not exist }
describe command("/usr/local/bin/wp --allow-root --format=csv --path=#{$wp_root} --fields=name,status theme list") do
its(:stdout) { should_not match /.*twentysixteen,active.*/ }
end
end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment