-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwordpress.yaml
57 lines (57 loc) · 1.5 KB
/
wordpress.yaml
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
---
- name: Install LAMP and Wordpress
become: yes
become_method: sudo
user: centos
hosts: all
tasks:
- name: Ensure epel repo present
yum:
name: https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
state: present
- name: Add Remi Repository
yum_repository:
name: remi-php71
description: Remi's PHP 7.3 RPM repository for Enterprise Linux $releasever - $basearch
mirrorlist: http://rpms.remirepo.net/enterprise/$releasever/php73/mirror
enabled: yes
gpgcheck: 1
gpgkey: http://rpms.remirepo.net/RPM-GPG-KEY-remi
- name: Utilis install
yum:
name: yum-utils
state: present
- name: Install packages
package:
name: "{{item}}"
state: present
with_items:
- wget
- httpd
- php
- php-mysql
- mariadb
- mariadb-server
- name: Unarchive a file that needs to be downloaded (added in 2.0)
unarchive:
src: https://wordpress.org/latest.tar.gz
dest: /var/www/html
remote_src: yes
- name: moving files
shell: mv /var/www/html/wordpress/* /var/www/html
- name: Change file ownership, group and permissions
file:
path: /var/www/html
owner: apache
group: apache
- name: Disable SELinux
selinux:
state: disabled
- name: Put SELinux in permissive mode, logging actions that would be blocked.
selinux:
policy: targeted
state: permissive
- name: Restart Apache
service:
name: httpd
state: restarted