-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwordpress_test.yaml
48 lines (48 loc) · 1.24 KB
/
wordpress_test.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
---
- 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
- unzip
- php-mysql
- mariadb
- mariadb-server
- name: Disable SELinux
selinux:
state: disabled
- name: Put SELinux in permissive mode, logging actions that would be blocked.
selinux:
policy: targeted
state: permissive
- name: Unarchive a file that needs to be downloaded
unarchive:
extra_opts: '--strip 1'
src: https://wordpress.org/latest.tar.gz
dest: /var/www/html
remote_src: yes