30 lines
759 B
YAML
30 lines
759 B
YAML
---
|
|
- name: Crear directori d'instal·lació de WordPress
|
|
ansible.builtin.file:
|
|
path: "{{ wp_install_dir }}"
|
|
state: directory
|
|
owner: www-data
|
|
group: www-data
|
|
mode: '0755'
|
|
|
|
- name: Descarregar WordPress
|
|
ansible.builtin.get_url:
|
|
url: "https://wordpress.org/wordpress-{{ wp_version }}.tar.gz"
|
|
dest: /tmp/wordpress.tar.gz
|
|
|
|
- name: Extreure WordPress
|
|
ansible.builtin.unarchive:
|
|
src: /tmp/wordpress.tar.gz
|
|
dest: /var/www/html/
|
|
remote_src: yes
|
|
owner: www-data
|
|
group: www-data
|
|
creates: "{{ wp_install_dir }}/wp-login.php"
|
|
|
|
- name: Copiar wp-config.php
|
|
ansible.builtin.template:
|
|
src: wp-config.php.j2
|
|
dest: "{{ wp_install_dir }}/wp-config.php"
|
|
owner: www-data
|
|
group: www-data
|
|
mode: '0640' |