summaryrefslogtreecommitdiff
path: root/manifests/init.pp
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2016-07-07 12:50:37 -0300
committerSilvio Rhatto <rhatto@riseup.net>2016-07-07 12:50:37 -0300
commit366440c2b07c971f4aeaece36afb252796bbb4d0 (patch)
tree94dc7eea301ef6c1e39a5699bcbefe442003f3cc /manifests/init.pp
parent38710eeeeaa94dfbddd0bf3f82bfb308b1c3bb7b (diff)
downloadpuppet-wordpress-366440c2b07c971f4aeaece36afb252796bbb4d0.tar.gz
puppet-wordpress-366440c2b07c971f4aeaece36afb252796bbb4d0.tar.bz2
Updates CLI
Diffstat (limited to 'manifests/init.pp')
-rw-r--r--manifests/init.pp12
1 files changed, 10 insertions, 2 deletions
diff --git a/manifests/init.pp b/manifests/init.pp
index 4bc2a34..93befc8 100644
--- a/manifests/init.pp
+++ b/manifests/init.pp
@@ -1,6 +1,8 @@
class wordpress {
$wp_cli = 'https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar'
+ include php::composer
+
file { "/usr/local/bin/wordpress":
ensure => present,
source => "puppet:///modules/wordpress/wordpress.sh",
@@ -9,11 +11,17 @@ class wordpress {
mode => 755,
}
- # Composer
+ # Wordpress command line
exec { 'getwp':
- command => "/usr/bin/wget ${wp_cli} -O /usr/local/bin/wp-cli && chmod +x /usr/local/bin/wp-cli",
+ command => "/usr/bin/wget ${wp_cli} -O /usr/local/bin/wp && chmod +x /usr/local/bin/wp",
user => 'root',
cwd => '/tmp',
creates => '/usr/local/bin/wp-cli',
+ require => Exec['getcomposer'],
+ }
+
+ # Old location
+ file { '/usr/local/bin/wp-cli':
+ ensure => absent,
}
}