# Both invoked in 4-SERVER-OPTIONS, by roles/www_options/tasks/main.yml:
#
# httpd/tasks/homepage.yml
# nginx/tasks/homepage.yml

- name: Install /etc/{{ apache_conf_dir }}/iiab-homepage.conf from httpd/templates, so Apache redirects http://box to http://box{{ iiab_home_url }}    # /home
  template:
    src: roles/httpd/templates/iiab-homepage.conf
    dest: "/etc/{{ apache_conf_dir }}/iiab-homepage.conf"    # apache2/sites-available (on debuntu)

- name: "IN CASE NGINX IS DISABLED: Enable IIAB pages via Apache (e.g. on port 80) by running 'a2ensite iiab-homepage.conf'"
  command: a2ensite iiab-homepage.conf
  #when: apache_enabled

# - name: Disable IIAB pages via Apache (e.g. on port 80) by running 'a2dissite iiab-homepage.conf', if not apache_enabled"
#   command: a2dissite iiab-homepage.conf
#   when: not apache_enabled