-
Notifications
You must be signed in to change notification settings - Fork 0
/
wordpress.sls
54 lines (41 loc) · 965 Bytes
/
wordpress.sls
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
# This block creates the wordpress database, user and sets user access.
wordpress_db:
mysql_database.present:
- name: wordpress
mysql_user.present:
- name: wordpress
- password: password
mysql_grants.present:
- database: wordpress.*
- grant: ALL PRIVILEGES
- user: wordpress
#Installs other dependancies
php-curl:
pkg.installed: []
php-gd:
pkg.installed: []
php-mbstring:
pkg.installed: []
php-mcrypt:
pkg.installed: []
php-xml:
pkg.installed: []
php-xmlrpc:
pkg.installed: []
apache2:
service.running:
- enable: True
- reload: True
#TODO: Copy WP dir to /var/www/html
wordpress:
cmd.run:
- name: 'wget http://wordpress.org/latest.tar.gz -P /var/www/wordpress && tar xvzf latest.tar.gz '
#Set ownership of WP dir to current user
/var/www/html:
file.directory:
- user: ubuntu
- group: ubuntu
- mode: 777 # some permission
- recurse:
- user
- group