-
Notifications
You must be signed in to change notification settings - Fork 84
/
wp.pp
80 lines (72 loc) · 1.89 KB
/
wp.pp
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
define chassis::wp (
$location,
$wpdir = 'wp',
$contentdir = 'content',
$hosts = [],
$database = 'wordpress',
$database_user = 'root',
$database_password = 'password',
$database_host = 'localhost',
$database_prefix = 'wp_',
$admin_user = 'admin',
$admin_email = 'admin@example.com',
$admin_password = 'password',
$network = false,
$plugins = [],
$themes = [],
$extensions = [],
) {
if ( $network == true ) {
chassis::network { $name:
location => $location,
wpdir => $wpdir,
contentdir => $contentdir,
hosts => $hosts,
database => $database,
database_user => $database_user,
database_password => $database_password,
database_host => $database_host,
admin_user => $admin_user,
admin_email => $admin_email,
admin_password => $admin_password,
}
}
else {
chassis::site { $name:
location => $location,
wpdir => $wpdir,
contentdir => $contentdir,
hosts => $hosts,
database => $database,
database_user => $database_user,
database_password => $database_password,
database_host => $database_host,
admin_user => $admin_user,
admin_email => $admin_email,
admin_password => $admin_password,
}
}
file { '/vagrant/index.php':
content => template('chassis/index.php.erb')
}
file { '/vagrant/local-config-db.php':
content => template('chassis/local-config-db.php.erb')
}
file { '/vagrant/local-config-extensions.php':
content => template('chassis/local-config-extensions.php.erb')
}
file { '/home/vagrant/.wp-cli':
ensure => directory
}
file { '/home/vagrant/.wp-cli/config.yml':
content => template('chassis/wp-cli.yml.erb')
}
wp::plugin { $plugins:
location => $location,
ensure => 'enabled',
}
wp::theme { $themes:
location => $location,
ensure => 'enabled',
}
}