41 lines
835 B
YAML
41 lines
835 B
YAML
---
|
|
- name: Install Wordpress Dependencies
|
|
become: Yes
|
|
ansible.builtin.apt:
|
|
update_cache: true
|
|
state: latest
|
|
name:
|
|
- ghostscript
|
|
- php
|
|
- php-bcmath
|
|
- php-curl
|
|
- php-intl
|
|
- php-json
|
|
- php-mbstring
|
|
- php-mysql
|
|
- php-xml
|
|
- php-zip
|
|
- mariadb-server
|
|
- python3-mysqldb
|
|
|
|
- name: create wordpress directory
|
|
ansible.builtin.file:
|
|
path: /var/www/html
|
|
state: directory
|
|
mode: '0755'
|
|
|
|
- name: extract wordpress
|
|
ansible.builtin.unarchive:
|
|
src: https://wordpress.org/latest.tar.gz
|
|
remote_src: true
|
|
dest: /var/www/html
|
|
|
|
- name: Import Wordpress database config
|
|
become: yes
|
|
ansible.builtin.template:
|
|
src: "config-localhost.php.j2"
|
|
dest: "/var/www/html/wordpress/wp-config.php"
|
|
owner: root
|
|
group: root
|
|
mode: 0644
|