summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2016-01-19 16:13:17 -0200
committerSilvio Rhatto <rhatto@riseup.net>2016-01-19 16:13:17 -0200
commit571fc50cad04631b2104efc9985a81a0d0e9afd9 (patch)
tree215fda16943344d2562c6355769739925bcde7c2
parent6cafba803ba5db047209d471378b6d4734b95123 (diff)
downloadpuppet-wordpress-571fc50cad04631b2104efc9985a81a0d0e9afd9.tar.gz
puppet-wordpress-571fc50cad04631b2104efc9985a81a0d0e9afd9.tar.bz2
Fix wp-cli install
-rw-r--r--manifests/init.pp26
1 files changed, 14 insertions, 12 deletions
diff --git a/manifests/init.pp b/manifests/init.pp
index 9af4b97..f5efdf8 100644
--- a/manifests/init.pp
+++ b/manifests/init.pp
@@ -1,25 +1,27 @@
class wordpress {
+ $wp_cli = 'https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar'
+
file { "/usr/local/sbin/wordpress":
- ensure => present,
- source => "puppet:///modules/wordpress/wordpress.sh",
- owner => root,
- group => root,
- mode => 755,
+ ensure => present,
+ source => "puppet:///modules/wordpress/wordpress.sh",
+ owner => root,
+ group => root,
+ mode => 755,
}
# Composer
exec { 'getwp':
- command => '/usr/bin/wget https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar -O /usr/local/bin/wp-cli',
- user => 'root',
- cwd => '/tmp',
- creates => '/usr/local/bin/wp-cli',
+ command => "/usr/bin/wget ${wp_cli} -O /usr/local/bin/wp-cli && chmod +x /usr/local/bin/wp-cli",
+ user => 'root',
+ cwd => '/tmp',
+ creates => '/usr/local/bin/wp-cli',
}
# TODO: remove in the future
file { "/usr/local/sbin/wp":
- ensure => absent,
- owner => root,
- group => root,
+ ensure => absent,
+ owner => root,
+ group => root,
}
# TODO: remove in the future