diff --git a/roles/wordpress/tasks/apache.yml b/roles/wordpress/tasks/apache.yml new file mode 100644 index 000000000..a0392782f --- /dev/null +++ b/roles/wordpress/tasks/apache.yml @@ -0,0 +1,12 @@ +- name: Enable http://box{{ wp_url }} via Apache + command: a2ensite wordpress.conf + when: wordpress_enabled + +- name: Disable http://box{{ wp_url }} via Apache + command: a2dissite wordpress.conf + when: not wordpress_enabled + +- name: Restart Apache systemd service ({{ apache_service }}) + systemd: + name: "{{ apache_service }}" # apache2 or httpd, as set in /opt/iiab/iiab/vars/.yml + state: restarted