summaryrefslogtreecommitdiff
path: root/manifests/init.pp
blob: aa245935eb13d5d183bb1ef4c62c245d461414bc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
class wordpress {

  case $wordpress_folder {
    '' : {
      case $apache_www_folder {
        '':      { fail("you need to define \$apache_www_folder for wordpress module") }
        default: { $wordpress_folder = $apache_www_folder }
      }
    }
  }

  $real_wordpress_locale = $wordpress_locale ? {
    ''      => '',
    default => "-${wordpress_locale}"
  } 

  file { "/usr/local/sbin/wordpress":
    ensure  => present,
    content => template('wordpress/wordpress.sh.erb'),
    owner   => root,
    group   => root,
    mode    => 755,
  }

  file { "/usr/local/sbin/wp":
    ensure  => '/usr/local/sbin/wordpress',
    owner   => root,
    group   => root,
  }

  vcsrepo { "/usr/local/share/wp-cli":
    ensure   => present,
    provider => git,
    source   => 'git://github.com/wp-cli/wp-cli.git',
    revision => 'fe2be3169b315fd0ffd5e65949aa29713f7329d9',
    owner    => 'root',
    group    => 'root',
  }
}