mirror of
https://github.com/iiab/iiab.git
synced 2025-03-09 15:40:17 +00:00
Merge pull request #1016 from holta/httpd-cleanup
httpd playbook output clarified
This commit is contained in:
commit
7d90eccdd3
2 changed files with 32 additions and 27 deletions
|
@ -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"
|
||||
|
|
|
@ -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)
|
||||
|
@ -31,7 +32,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
|
||||
|
@ -50,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:
|
||||
|
@ -65,9 +67,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)
|
||||
|
@ -100,20 +102,23 @@
|
|||
|
||||
- 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:
|
||||
- 010-iiab.conf
|
||||
when: is_debuntu
|
||||
|
||||
- name: Remove the default site container (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
|
||||
- name: Create http pid dir /var/run/{{ apache_user }}
|
||||
file:
|
||||
path: "/var/run/{{ apache_user }}"
|
||||
mode: 0755
|
||||
|
@ -126,14 +131,14 @@
|
|||
name: admin
|
||||
state: present
|
||||
|
||||
- name: Add apache user to admin group
|
||||
- name: Add {{ apache_user }} (from variable 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
|
||||
|
@ -180,14 +185,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
|
||||
|
|
Loading…
Add table
Reference in a new issue