summaryrefslogtreecommitdiff
path: root/manifests/init.pp
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2016-01-19 16:08:12 -0200
committerSilvio Rhatto <rhatto@riseup.net>2016-01-19 16:08:12 -0200
commit6cafba803ba5db047209d471378b6d4734b95123 (patch)
tree3fd085f6e03edeb4a15dd9560b4557216c7d5582 /manifests/init.pp
parent8e3d9bed30f3bb9e292a57d0f51cff5ac080a7c4 (diff)
downloadpuppet-wordpress-6cafba803ba5db047209d471378b6d4734b95123.tar.gz
puppet-wordpress-6cafba803ba5db047209d471378b6d4734b95123.tar.bz2
Simplify module
Diffstat (limited to 'manifests/init.pp')
-rw-r--r--manifests/init.pp27
1 files changed, 14 insertions, 13 deletions
diff --git a/manifests/init.pp b/manifests/init.pp
index 423b3ba..9af4b97 100644
--- a/manifests/init.pp
+++ b/manifests/init.pp
@@ -1,29 +1,30 @@
-class wordpress(
- $folder = '/var/www/data',
- $locale = hiera('wordpress::locale', '')
-) {
-
- $real_wordpress_locale = $locale ? {
- '' => '',
- default => "-${locale}"
- }
-
+class wordpress {
file { "/usr/local/sbin/wordpress":
ensure => present,
- content => template('wordpress/wordpress.sh.erb'),
+ 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',
+ }
+
+ # TODO: remove in the future
file { "/usr/local/sbin/wp":
- ensure => '/usr/local/sbin/wordpress',
+ ensure => absent,
owner => root,
group => root,
}
+ # TODO: remove in the future
vcsrepo { "/usr/local/share/wp-cli":
- ensure => present,
+ ensure => absent,
provider => git,
source => 'git://github.com/wp-cli/wp-cli.git',
revision => 'b30a0745ef5ffe1c9f2a4d9a021aef213a78c867',