Skip to content
This repository was archived by the owner on Feb 27, 2018. It is now read-only.

Commit 816ba8a

Browse files
committed
Use WP module to install WP
Instead of manually running the wp-cli command, we should use the WordPress module. We couldn't do this in the past because is-installed was broken. This appears to be fixed! fixes #43
1 parent 288509d commit 816ba8a

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

puppet/manifests/sections/gitplugin.pp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
source => $git_urls[$title],
77
provider => git,
88
require => [
9-
Exec['wp install /srv/www/wp'],
9+
Wp::Site['/srv/www/wp'],
1010
File['/srv/www/wp-content/plugins'],
1111
]
1212
}

puppet/manifests/sections/wp.pp

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,14 @@
2525
include database::settings
2626

2727
# Install WordPress
28-
exec { 'wp install /srv/www/wp':
29-
command => "/usr/bin/wp core multisite-install --url='${quickstart_domain}' --title='${quickstart_domain}' --admin_email='wordpress@${quickstart_domain}' --admin_name='wordpress' --admin_password='wordpress'",
30-
cwd => '/srv/www/wp',
31-
unless => "test -z ${quickstart_domain}",
32-
user => 'www-data',
33-
require => [
28+
wp::site { '/srv/www/wp':
29+
url => $quickstart_domain,
30+
sitename => $quickstart_domain,
31+
admin_user => 'wordpress',
32+
admin_password => 'wordpress',
33+
network => true,
34+
require => [
3435
Vcsrepo['/srv/www/wp'],
35-
Class['wp::cli'],
3636
Line['path:/srv/www/wp'],
3737
]
3838
}
@@ -48,7 +48,7 @@
4848
location => '/srv/www/wp',
4949
networkwide => true,
5050
require => [
51-
Exec['wp install /srv/www/wp'],
51+
Wp::Site['/srv/www/wp'],
5252
File['/srv/www/wp-content/plugins'],
5353
Gitplugin[ $github_plugin_keys ],
5454
]
@@ -58,7 +58,7 @@
5858
wp::command { 'plugin update --all':
5959
command => 'plugin update --all',
6060
location => '/srv/www/wp',
61-
require => Exec['wp install /srv/www/wp'],
61+
require => Wp::Site['/srv/www/wp'],
6262
}
6363

6464
# Symlink db.php for Query Monitor

0 commit comments

Comments
 (0)