ansible-ffibk/roles/service-nginx-wordpress/tasks/main.yml
prisma01 b91112516d
Introduce Kumpir, our new www server, add wordpress role (#26)
* Introduce Kumpir, our new www server, add wordpress role

* move kumpir to services group, use safer distinction for ssl_cert location, reduce www playbook

* set server type to services

* fix typo

* rename service-wordpress to service-nginx-wordpress

* Add service-nginx-etherpad role

* Add ed25519 keypair for system_users when supported.

* Revert "Add ed25519 keypair for system_users when supported."

This reverts commit ffef991ca41185d19953b96439e80b1b9a6ba534.

* Change generated keys format to ed25519

* fix indention of nginx templates, reduce amount of needed tasks by adding extra_opts to unarchive, remove not needed mysql db tasks, make new acme_server default

* Change new default preference for acme servers, marking acme_server zuckerwatte deprecated soon.
2019-09-26 22:13:13 +02:00

45 lines
1.1 KiB
YAML

---
- name: Wordpress | Create directory
file:
path: "{{ wp_install_dir }}"
state: directory
mode: 0755
- name: Wordpress | Extract archive in {{ wp_install_dir }}
unarchive:
src: "http://wordpress.org/wordpress-{{ wp_version }}.tar.gz"
dest: "{{ wp_install_dir }}"
extra_opts:
- --strip-components=1
remote_src: yes
- name: Wordpress | Fetch random salts for wp-config.php
delegate_to: localhost
command: curl https://api.wordpress.org/secret-key/1.1/salt/
become: False
args:
warn: false
register: 'wp_salt'
- name: Wordpress | Copy wp-config.php file
template:
src: wp-config.php.j2
dest: "{{ wp_install_dir }}/wp-config.php"
- name: Wordpress | Change ownership of installation directory
file:
path: "{{ wp_install_dir }}"
owner: www-data
group: www-data
state: directory
recurse: yes
- name: Wordpress | Nginx | Copy virtual host configuration file
template:
src: "nginx-vhost.j2"
dest: /etc/nginx/conf.d/{{ wp_service_name.split(".")[0] }}.conf
owner: root
group: root
mode: 0644
notify:
- restart nginx