-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup-wordpress.yml
More file actions
39 lines (39 loc) · 1.01 KB
/
setup-wordpress.yml
File metadata and controls
39 lines (39 loc) · 1.01 KB
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
---
- name: installs httpd mysqld php and calls script to setup and configure wordpress
hosts: web
tasks:
- name: apache setup
yum: name=httpd
become: true
become_user: root
- name: php setup
yum: name=php
become: true
become_user: root
- name: php-mysql setup
yum: name=php-mysql
become: true
become_user: root
- name: start apache
service: name=httpd state=started
become: true
become_user: root
- name: Install mysql
yum: name=mysql-server
become: true
become_user: root
- name: start mysql
service: name=mysqld state=started
become: true
become_user: root
- name: copy SQL file to destination
copy: src=wordpress.sql dest=/home/ec2-user/wordpress.sql
- name: copy script
copy: src=setupWP.sh dest=/home/ec2-user/setupWP.sh
- name: script perms
shell: chmod +x /home/ec2-user/setupWP.sh
- name: run script
shell: /home/ec2-user/setupWP.sh
become: true
become_user: root
...