mirror of
https://github.com/iiab/iiab.git
synced 2025-03-09 15:40:17 +00:00
Merge pull request #2793 from holta/awstats-deps-cleanup
awstats/tasks/install.yml: sorting out Apache vs. NGINX dependencies (WIP)
This commit is contained in:
commit
5729f35059
1 changed files with 15 additions and 17 deletions
|
@ -1,31 +1,29 @@
|
||||||
# TO DO:
|
# TO DO:
|
||||||
#
|
#
|
||||||
# - Prepare for a possible future w/o Apache by verifying/refining below...
|
# Prepare for a possible future w/o Apache by verifying/refining below...
|
||||||
# - 5 'when: apache_installed is defined'
|
# - 5 'when: apache_installed is defined' (2021-05-21: COMMENT OUT THESE STANZAS SOON!?)
|
||||||
# - 1 'when: nginx_install'
|
# - 1 'when: nginx_install'
|
||||||
# - 8 core stanzas w/o such 'when:' clauses
|
# - 8 core stanzas w/o such 'when:' clauses
|
||||||
|
|
||||||
- name: 'Install 3 packages: awstats, openssl, pwauth'
|
- name: 'Install package: awstats'
|
||||||
package:
|
package:
|
||||||
name:
|
name: awstats
|
||||||
- awstats
|
|
||||||
- pwauth
|
|
||||||
- openssl
|
|
||||||
state: present
|
state: present
|
||||||
|
|
||||||
- name: 'Install 2 packages: apache2-utils, libapache2-mod-authnz-external'
|
- name: 'Install package: pwauth (when: apache_installed is defined)'
|
||||||
package:
|
package:
|
||||||
name:
|
name:
|
||||||
- libapache2-mod-authnz-external
|
- pwauth # Auto-installs apache2-bin and libapache2-mod-authnz-external
|
||||||
- apache2-utils
|
#- apache2-utils # Unneeded? (In any case, already installed by Apache itself.)
|
||||||
|
#- openssl # Unneeded? (In any case, already installed by most every Linux distro.)
|
||||||
state: present
|
state: present
|
||||||
when: apache_installed is defined
|
when: apache_installed is defined
|
||||||
|
|
||||||
- name: Run 'a2enmod cgi' to enable cgi execution via Apache
|
- name: "Run 'a2enmod cgi' to enable cgi execution via Apache (when: apache_installed is defined)"
|
||||||
command: a2enmod cgi
|
command: a2enmod cgi
|
||||||
when: apache_installed is defined
|
when: apache_installed is defined
|
||||||
|
|
||||||
- name: Create directory... mkdir {{ apache_log_dir }}, recursively chown {{ apache_user }}:{{ apache_user }}, with chmod u+rw,g+r,g-w,o-rwx
|
- name: 'Create directory... mkdir {{ apache_log_dir }}, recursively chown {{ apache_user }}:{{ apache_user }}, with chmod u+rw,g+r,g-w,o-rwx (when: apache_installed is defined)'
|
||||||
file:
|
file:
|
||||||
state: directory
|
state: directory
|
||||||
recurse: yes
|
recurse: yes
|
||||||
|
@ -41,7 +39,7 @@
|
||||||
state: directory
|
state: directory
|
||||||
recurse: yes
|
recurse: yes
|
||||||
path: "{{ item }}"
|
path: "{{ item }}"
|
||||||
owner: "{{ apache_user }}"
|
owner: "{{ apache_user }}" # USED FOR NGINX TOO: 'www-data' on debuntu
|
||||||
group: "{{ apache_user }}"
|
group: "{{ apache_user }}"
|
||||||
mode: u+rw,g+r,g-w,o-rwx # '0750' turned on too many x bits
|
mode: u+rw,g+r,g-w,o-rwx # '0750' turned on too many x bits
|
||||||
#force: yes
|
#force: yes
|
||||||
|
@ -49,13 +47,13 @@
|
||||||
- "{{ awstats_data_dir }}" # /library/awstats
|
- "{{ awstats_data_dir }}" # /library/awstats
|
||||||
- /usr/lib/cgi-bin/awstats # create backward compatible path for awstats
|
- /usr/lib/cgi-bin/awstats # create backward compatible path for awstats
|
||||||
|
|
||||||
- name: Install /etc/{{ apache_conf_dir }}/awstats.conf from template
|
- name: 'Install /etc/{{ apache_conf_dir }}/awstats.conf from template (when: apache_installed is defined)'
|
||||||
template:
|
template:
|
||||||
src: apache-awstats.conf
|
src: apache-awstats.conf
|
||||||
dest: "/etc/{{ apache_conf_dir }}/awstats.conf" # apache2/sites-available on debuntu
|
dest: "/etc/{{ apache_conf_dir }}/awstats.conf" # apache2/sites-available on debuntu
|
||||||
when: apache_installed is defined
|
when: apache_installed is defined
|
||||||
|
|
||||||
- name: Install /etc/logrotate.d/apache2 from template, to ensure logrotate doesn't make logs unreadable
|
- name: "Install /etc/logrotate.d/apache2 from template, to ensure logrotate doesn't make logs unreadable (when: apache_installed is defined)"
|
||||||
template:
|
template:
|
||||||
src: logrotate.d.apache2
|
src: logrotate.d.apache2
|
||||||
dest: /etc/logrotate.d/apache2
|
dest: /etc/logrotate.d/apache2
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue