1
0
Fork 0
mirror of https://github.com/iiab/iiab.git synced 2025-03-09 15:40:17 +00:00

Try roles/www_back_end in Stage 3 & roles/www_front_end in Stage 4

This commit is contained in:
root 2020-02-12 20:53:36 -05:00
parent c2bda06545
commit efd62be606
57 changed files with 139 additions and 66 deletions

View file

@ -6,13 +6,13 @@
- name: Install /etc/{{ apache_service }}/ports.conf from template 1 of 2 (ports.conf.j2) if nginx_enabled, to enable Apache port {{ apache_port }} localhost only
template:
src: ports.conf.j2
dest: "/etc/{{ apache_service }}/ports.conf" # apache2 or httpd
dest: "/etc/{{ apache_service }}/ports.conf"
when: nginx_enabled | bool
- name: Install /etc/{{ apache_service }}/ports.conf from template 2 of 2 (stock-apache-ports.conf) if not nginx_enabled, to disable Apache port {{ apache_port }} localhost only
template:
src: stock-apache-ports.conf
dest: "/etc/{{ apache_service }}/ports.conf" # apache2 or httpd
dest: "/etc/{{ apache_service }}/ports.conf"
when: not nginx_enabled
- name: Enable & Restart '{{ apache_service }}' if apache_enabled or not nginx_enabled, since we stopped it

View file

@ -0,0 +1,9 @@
# Both invoked in 4-SERVER-OPTIONS, by roles/www_front_end/tasks/main.yml:
#
# httpd/tasks/homepage.yml
# nginx/tasks/homepage.yml
- name: Install {{ nginx_conf_dir }}/iiab.conf from nginx/templates, so NGINX redirects http://box to http://box{{ iiab_home_url }} # /home
template:
src: roles/nginx/templates/iiab.conf.j2
dest: "{{ nginx_conf_dir }}/iiab.conf" # /etc/nginx/conf.d

View file

@ -35,7 +35,7 @@
path: /etc/nginx/sites-enabled/default
state: absent
- name: 'Install 3 files from template: /etc/nginx/server.conf, /etc/nginx/nginx.conf, {{ nginx_conf_dir }}/iiab.conf'
- name: 'Install 2 (of 4) files from template: /etc/nginx/server.conf, /etc/nginx/nginx.conf'
template:
src: "{{ item.src }}"
dest: "{{ item.dest }}"
@ -43,9 +43,13 @@
- { src: 'server.conf.j2', dest: '/etc/nginx/server.conf' }
- { src: 'nginx.conf.j2', dest: '/etc/nginx/nginx.conf' }
#- { src: 'ports.conf.j2', dest: '/etc/{{ apache_service }}/ports.conf' } # Moved to enable-or-disable.yml
- { src: 'iiab.conf.j2', dest: "{{ nginx_conf_dir }}/iiab.conf" } # /etc/nginx/conf.d
#- { src: 'iiab.conf.j2', dest: "{{ nginx_conf_dir }}/iiab.conf" } # Moved into homepage.yml below
# php-stem extension installed by roles/web_support/tasks/php-stem.yml
- debug:
msg: roles/nginx/tasks/homepage.yml will run LATER (invoked by roles/www_front_end/tasks/main.yml) SO THAT NGINX CAN REDIRECT http://box TO http://box{{ iiab_home_url }} (based on var iiab_home_url)
# - include_tasks: roles/nginx/tasks/homepage.yml
# php-stem extension installed by roles/www_back_end/tasks/php-stem.yml
# here it is linked to php-fpm
- name: Symlink /etc/php/{{ php_version }}/fpm/conf.d/20-stem.ini -> /etc/php/{{ php_version }}/mods-available/stem.ini
file: