mirror of
https://github.com/iiab/iiab.git
synced 2025-02-13 11:42:08 +00:00
Update wordpress/tasks/enable.yml
This commit is contained in:
parent
2a11796af0
commit
80f9e202ee
1 changed files with 25 additions and 26 deletions
|
@ -1,39 +1,38 @@
|
||||||
- name: Create symlink wordpress.conf from sites-enabled to sites-available, if wordpress_enabled (debuntu)
|
# Apache
|
||||||
file:
|
|
||||||
src: /etc/apache2/sites-available/wordpress.conf
|
|
||||||
path: /etc/apache2/sites-enabled/wordpress.conf
|
|
||||||
state: link
|
|
||||||
when: wordpress_enabled and not nginx_enabled
|
|
||||||
|
|
||||||
- name: Remove /etc/apache2/sites-enabled/wordpress.conf if not wordpress_enabled (debuntu)
|
- name: "Enable http://box{{ wp_url }} via Apache"
|
||||||
file:
|
command: a2ensite wordpress.conf
|
||||||
path: /etc/apache2/sites-enabled/wordpress.conf
|
when: apache_install and wordpress_enabled
|
||||||
state: absent
|
|
||||||
when: not wordpress_enabled and is_debuntu
|
|
||||||
|
|
||||||
- name: Install {{ nginx_config_dir }}/wordpress-nginx.conf from template, for http://box{{ wp_url }}
|
- name: "Disable http://box{{ wp_url }} via Apache"
|
||||||
template:
|
command: a2dissite wordpress.conf
|
||||||
src: wordpress-nginx.conf.j2
|
when: apache_install and not wordpress_enabled
|
||||||
dest: "{{ nginx_config_dir }}/wordpress-nginx.conf"
|
|
||||||
when: wordpress_enabled and nginx_enabled
|
|
||||||
|
|
||||||
- name: Remove {{ nginx_config_dir }}/wordpress-nginx.conf if not wordpress_enabled (debuntu)
|
- name: Restart Apache systems service ({{ apache_service }})
|
||||||
file:
|
|
||||||
path: "{{ nginx_config_dir }}/wordpress-nginx.conf"
|
|
||||||
state: absent
|
|
||||||
when: not wordpress_enabled and nginx_enabled
|
|
||||||
|
|
||||||
- name: Restart Apache service ({{ apache_service }}) to enable/disable http://box{{ wp_url }}
|
|
||||||
systemd:
|
systemd:
|
||||||
name: "{{ apache_service }}"
|
name: "{{ apache_service }}"
|
||||||
state: restarted
|
state: restarted
|
||||||
when: not nginx_enabled
|
when: apache_enabled | bool
|
||||||
|
|
||||||
- name: Restart nginx service to enable/disable http://box{{ wp_url }}
|
# NGINX
|
||||||
|
|
||||||
|
- name: "Enable http://box{{ wp_url }} via NGINX, by installing {{ nginx_config_dir }}/wordpress-nginx.conf from template"
|
||||||
|
template:
|
||||||
|
src: wordpress-nginx.conf.j2
|
||||||
|
dest: "{{ nginx_config_dir }}/wordpress-nginx.conf"
|
||||||
|
when: nginx_install and wordpress_enabled
|
||||||
|
|
||||||
|
- name: "Disable http://box{{ wp_url }} via NGINX, by removing {{ nginx_config_dir }}/wordpress-nginx.conf"
|
||||||
|
file:
|
||||||
|
path: "{{ nginx_config_dir }}/wordpress-nginx.conf"
|
||||||
|
state: absent
|
||||||
|
when: nginx_install and not wordpress_enabled
|
||||||
|
|
||||||
|
- name: Restart nginx systemd service
|
||||||
systemd:
|
systemd:
|
||||||
name: nginx
|
name: nginx
|
||||||
state: restarted
|
state: restarted
|
||||||
when: nginx_enabled
|
when: nginx_enabled | bool
|
||||||
|
|
||||||
- name: Add 'wordpress' variable values to {{ iiab_ini_file }}
|
- name: Add 'wordpress' variable values to {{ iiab_ini_file }}
|
||||||
ini_file:
|
ini_file:
|
||||||
|
|
Loading…
Reference in a new issue