diff --git a/roles/nginx/tasks/main.yml b/roles/nginx/tasks/main.yml index 298e108e0..30054b654 100644 --- a/roles/nginx/tasks/main.yml +++ b/roles/nginx/tasks/main.yml @@ -59,51 +59,8 @@ - { src: 'ports.conf' , dest: '/etc/{{ apache_service }}/' , mode: '0644' } when: is_debuntu | bool and nginx_enabled | bool -- name: Install nginx's config file from template, if moodle_enabled - template: - src: moodle-nginx.conf.j2 - dest: "/etc/nginx/conf.d/moodle-nginx.conf" - owner: root - group: root - mode: 0644 - when: moodle_enabled | bool - -- name: Install /etc/nginx/conf.d/elgg-nginx.conf from template - template: - src: elgg-nginx.conf - dest: "/etc/nginx/conf.d/elgg-nginx.conf" - when: elgg_enabled | bool - -- name: Install /etc/nginx/lokole-nginx.conf from template - template: - src: lokole-nginx.conf.j2 - dest: "/etc/nginx/conf.d/lokole-nginx.conf" - when: lokole_enabled | bool - -- name: Install MediaWiki's nginx conf.d file from template - template: - src: mediawiki-nginx.conf.j2 - dest: /etc/nginx/conf.d/mediawiki-nginx.conf - when: mediawiki_enabled | bool - -- name: Install WordPress's nginx conf.d file from template - template: src=nextcloud-nginx.conf dest=/etc/nginx/conf.d/nextcloud-nginx.conf - when: nextcloud_enabled | bool - -- name: Install NodeRed's nginx conf.d file from template - template: - src: nodered-nginx.conf.j2 - dest: /etc/nginx/conf.d/nodered-nginx.conf - owner: root - group: root - mode: 0666 - when: nodered_enabled | bool - -- name: Install WordPress's nginx conf.d file from template - template: - src: wordpress-nginx.conf - dest: /etc/nginx/conf.d/ - when: wordpress_enabled | bool +- name: Install proxpass to apache running on localhost + include_tasks: uses_apache.yml - name: Make sure nginx picks up the config service: diff --git a/roles/nginx/tasks/uses_apache.yml b/roles/nginx/tasks/uses_apache.yml new file mode 100644 index 000000000..fb576bbaa --- /dev/null +++ b/roles/nginx/tasks/uses_apache.yml @@ -0,0 +1,48 @@ +- name: Install nginx's config file from template, if moodle_enabled + template: + src: moodle-nginx.conf.j2 + dest: "/etc/nginx/conf.d/moodle-nginx.conf" + owner: root + group: root + mode: 0644 + when: moodle_enabled | bool + +- name: Install /etc/nginx/conf.d/elgg-nginx.conf from template + template: + src: elgg-nginx.conf + dest: "/etc/nginx/conf.d/elgg-nginx.conf" + when: elgg_enabled | bool + +- name: Install /etc/nginx/lokole-nginx.conf from template + template: + src: lokole-nginx.conf.j2 + dest: "/etc/nginx/conf.d/lokole-nginx.conf" + when: lokole_enabled | bool + +- name: Install MediaWiki's nginx conf.d file from template + template: + src: mediawiki-nginx.conf.j2 + dest: /etc/nginx/conf.d/mediawiki-nginx.conf + when: mediawiki_enabled | bool + +- name: Install WordPress's nginx conf.d file from template + template: src=nextcloud-nginx.conf dest=/etc/nginx/conf.d/nextcloud-nginx.conf + when: nextcloud_enabled | bool + +- name: Install NodeRed's nginx conf.d file from template + template: + src: nodered-nginx.conf.j2 + dest: /etc/nginx/conf.d/nodered-nginx.conf + owner: root + group: root + mode: 0666 + when: nodered_enabled | bool + +- name: Install WordPress's nginx conf.d file from template + template: + src: wordpress-nginx.conf + dest: /etc/nginx/conf.d/ + when: wordpress_enabled | bool + +#- name: Install proxpass to apache running on localhost +