From 363ffad15cd5c669821bf95a4a2ea99eacab65fd Mon Sep 17 00:00:00 2001 From: A Holt Date: Tue, 21 Aug 2018 07:48:44 -0400 Subject: [PATCH 1/7] Update html.yml --- roles/httpd/tasks/html.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/roles/httpd/tasks/html.yml b/roles/httpd/tasks/html.yml index d6ea61dc3..df00e4266 100644 --- a/roles/httpd/tasks/html.yml +++ b/roles/httpd/tasks/html.yml @@ -1,4 +1,4 @@ -- name: Copy css files +- name: Copy css files to /library/www/html/common/css copy: src: "{{ item }}" dest: "{{ doc_root }}/common/css" @@ -8,7 +8,7 @@ with_fileglob: - html/css/*.css -- name: Copy js files +- name: Copy js files to /library/www/html/common/js copy: src: "{{ item }}" dest: "{{ doc_root }}/common/js" @@ -18,7 +18,7 @@ with_fileglob: - html/js/*.js -- name: Copy fonts files +- name: Copy fonts files to /library/www/html/common/fonts copy: src: "{{ item }}" dest: "{{ doc_root }}/common/fonts" @@ -28,7 +28,7 @@ with_fileglob: - html/fonts/* -- name: Copy html files +- name: Copy html files to /library/www/html/common/html copy: src: "{{ item }}" dest: "{{ doc_root }}/common/html" @@ -38,7 +38,7 @@ with_fileglob: - html/html/* -- name: Copy assets files +- name: Copy assets files to /library/www/html/common/assets copy: src: "{{ item }}" dest: "{{ doc_root }}/common/assets" @@ -49,7 +49,7 @@ - html/assets/* # copy all services, even if not permissioned elsewhere -- name: Copy services files +- name: Copy services files to /library/www/html/common/services copy: src: "{{ item }}" dest: "{{ doc_root }}/common/services" @@ -59,7 +59,7 @@ with_fileglob: - html/services/* -- name: Create symlink from assets to iiab.ini +- name: Create symlink from assets to /etc/iiab/iiab.ini file: src: "/etc/iiab/iiab.ini" dest: "{{ doc_root }}/common/assets/iiab.ini" From 7a1811e1beda74779d3b0939e027b89848f4a6f9 Mon Sep 17 00:00:00 2001 From: A Holt Date: Tue, 21 Aug 2018 08:02:44 -0400 Subject: [PATCH 2/7] Update main.yml --- roles/httpd/tasks/main.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/roles/httpd/tasks/main.yml b/roles/httpd/tasks/main.yml index ba5543dc5..b7a179634 100644 --- a/roles/httpd/tasks/main.yml +++ b/roles/httpd/tasks/main.yml @@ -31,7 +31,7 @@ - download when: is_ubuntu -- name: Sqlite3 no longer included in another package in ubuntu18 +- name: SQLite3 no longer included in another package (ubuntu-18) package: name: php{{ php_version }}-sqlite3 when: is_ubuntu_18 @@ -65,9 +65,9 @@ group: root mode: "{{ item.mode }}" with_items: - - { src: '010-iiab.conf.j2' , dest: '/etc/{{ apache_config_dir }}/010-iiab.conf', mode: '0755' } - - { src: 'proxy_ajp.conf.j2' , dest: '/etc/{{ apache_config_dir }}/proxy_ajp.conf', mode: '0644' } - - { src: 'php.ini.j2' , dest: '/etc/php.ini' , mode: '0644' } + - { src: '010-iiab.conf.j2', dest: '/etc/{{ apache_config_dir }}/010-iiab.conf', mode: '0755' } + - { src: 'proxy_ajp.conf.j2', dest: '/etc/{{ apache_config_dir }}/proxy_ajp.conf', mode: '0644' } + - { src: 'php.ini.j2', dest: '/etc/php.ini', mode: '0644' } # remove symlinks for mpm-event, replace with mpm-prefork - name: Remove mpm event links (debuntu) @@ -113,7 +113,7 @@ state: absent when: is_debuntu -- name: Create http pid dir +- name: Create http pid dir /var/run/{{ apache_user }} file: path: "/var/run/{{ apache_user }}" mode: 0755 @@ -126,14 +126,14 @@ name: admin state: present -- name: Add apache user to admin group +- name: Add apache_user {{ apache_user }} to admin group user: name: "{{ apache_user }}" groups: admin state: present createhome: no -- name: Create httpd log dir +- name: Create httpd log dir /var/log/{{ apache_service }} file: path: "/var/log/{{ apache_service }}" mode: 0755 From 7b5e82c4adeb497ab8b2694052fa8fad581d8327 Mon Sep 17 00:00:00 2001 From: A Holt Date: Tue, 21 Aug 2018 08:25:15 -0400 Subject: [PATCH 3/7] Update main.yml --- roles/httpd/tasks/main.yml | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/roles/httpd/tasks/main.yml b/roles/httpd/tasks/main.yml index b7a179634..3a99a7585 100644 --- a/roles/httpd/tasks/main.yml +++ b/roles/httpd/tasks/main.yml @@ -11,13 +11,14 @@ - download when: is_debian -- name: Debian changed sqlite name (debian-8) +- name: Debian changed SQLite name (debian-8) package: name: "php{{ php_version }}-sqlite" when: is_debian and ansible_distribution_major_version == "8" -- name: Debian changed sqlite name (debian-9) - package: name=php{{ php_version }}-sqlite3 +- name: Debian changed SQLite3 name (debian-9) + package: + name: "php{{ php_version }}-sqlite3" when: is_debian and ansible_distribution_major_version == "9" - name: Install httpd required packages (ubuntu) @@ -126,7 +127,7 @@ name: admin state: present -- name: Add apache_user {{ apache_user }} to admin group +- name: Add {{ apache_user }} (from variable apache_user) to admin group user: name: "{{ apache_user }}" groups: admin @@ -180,14 +181,14 @@ dest: /usr/bin/iiab-refresh-wiki-docs mode: 0755 -- name: Give apache_user permission for poweroff +- name: Give apache_user permission to poweroff template: src: 020_apache_poweroff.j2 dest: /etc/sudoers.d/020_apache_poweroff mode: 0755 when: allow_apache_sudo -- name: Remove apache_user permission for poweroff +- name: Remove apache_user permission to poweroff file: dest: /etc/sudoers.d/020_apache_poweroff state: absent From b774a4ea8bfe556ca53ff3a02c3c1dfe7ea0682a Mon Sep 17 00:00:00 2001 From: A Holt Date: Tue, 21 Aug 2018 08:32:16 -0400 Subject: [PATCH 4/7] Update main.yml --- roles/httpd/tasks/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/httpd/tasks/main.yml b/roles/httpd/tasks/main.yml index 3a99a7585..7f50dd980 100644 --- a/roles/httpd/tasks/main.yml +++ b/roles/httpd/tasks/main.yml @@ -108,7 +108,7 @@ - 010-iiab.conf when: is_debuntu -- name: Remove the default site container (debuntu) +- name: Remove the default apache2 config file (debuntu) file: dest: /etc/apache2/000-default.conf state: absent From 203d8b5392dfd708f515f264549bb05d1897c73f Mon Sep 17 00:00:00 2001 From: A Holt Date: Tue, 21 Aug 2018 08:40:01 -0400 Subject: [PATCH 5/7] Update main.yml --- roles/httpd/tasks/main.yml | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/roles/httpd/tasks/main.yml b/roles/httpd/tasks/main.yml index 7f50dd980..0b0f3ad61 100644 --- a/roles/httpd/tasks/main.yml +++ b/roles/httpd/tasks/main.yml @@ -51,11 +51,12 @@ - download when: is_redhat -- name: Remove the default apache2 config file (debuntu) - file: - path: /etc/apache2/sites-enabled/000-default.conf - state: absent - when: is_debuntu +# MOVED DOWN ~58 LINES +#- name: Remove the default apache2 config file (debuntu) +# file: +# path: /etc/apache2/sites-enabled/000-default.conf +# state: absent +# when: is_debuntu - name: Create httpd config files template: @@ -108,10 +109,13 @@ - 010-iiab.conf when: is_debuntu -- name: Remove the default apache2 config file (debuntu) +- name: Remove apache2 default config files (debuntu) file: - dest: /etc/apache2/000-default.conf + path: {{ item }} state: absent + with_items: + - /etc/apache2/000-default.conf + - /etc/apache2/sites-enabled/000-default.conf when: is_debuntu - name: Create http pid dir /var/run/{{ apache_user }} From 056d9eb87badb144097ac96cad22981f657e2b85 Mon Sep 17 00:00:00 2001 From: A Holt Date: Tue, 21 Aug 2018 08:41:02 -0400 Subject: [PATCH 6/7] Update main.yml --- roles/httpd/tasks/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/httpd/tasks/main.yml b/roles/httpd/tasks/main.yml index 0b0f3ad61..693bedf10 100644 --- a/roles/httpd/tasks/main.yml +++ b/roles/httpd/tasks/main.yml @@ -111,7 +111,7 @@ - name: Remove apache2 default config files (debuntu) file: - path: {{ item }} + path: "{{ item }}" state: absent with_items: - /etc/apache2/000-default.conf From 291b677c5557f523347df3fa6eb778b7b4151ab8 Mon Sep 17 00:00:00 2001 From: A Holt Date: Tue, 21 Aug 2018 08:46:08 -0400 Subject: [PATCH 7/7] Update main.yml --- roles/httpd/tasks/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/httpd/tasks/main.yml b/roles/httpd/tasks/main.yml index 693bedf10..797cbc05a 100644 --- a/roles/httpd/tasks/main.yml +++ b/roles/httpd/tasks/main.yml @@ -102,7 +102,7 @@ - name: Create symlinks for enabling our site (debuntu) file: - path: "/etc/apache2/sites-enabled/{{ item }}" + path: "/etc/apache2/sites-enabled/{{ item }}" # Not nec on Raspbian. Is this really still needed elsewhere? src: "/etc/apache2/sites-available/{{ item }}" state: link with_items: