mirror of
https://github.com/iiab/iiab.git
synced 2025-03-09 15:40:17 +00:00
Update install.yml
This commit is contained in:
parent
70ce5ebd59
commit
e774c31b39
1 changed files with 19 additions and 21 deletions
|
@ -1,21 +1,19 @@
|
|||
- name: Install AWStats package
|
||||
- name: Install packages {awstats, pwauth, openssl}
|
||||
package:
|
||||
name: "{{ item }}"
|
||||
name:
|
||||
- awstats
|
||||
- pwauth
|
||||
- openssl
|
||||
state: present
|
||||
with_items:
|
||||
- awstats
|
||||
- pwauth
|
||||
- openssl
|
||||
tags:
|
||||
- download
|
||||
|
||||
- name: Install AWStats package (debuntu)
|
||||
- name: Install packages libapache2-mod-authnz-external and apache2-utils (debuntu)
|
||||
package:
|
||||
name: "{{ item }}"
|
||||
name:
|
||||
- libapache2-mod-authnz-external
|
||||
- apache2-utils
|
||||
state: present
|
||||
with_items:
|
||||
- libapache2-mod-authnz-external
|
||||
- apache2-utils
|
||||
when: is_debuntu
|
||||
tags:
|
||||
- download
|
||||
|
@ -37,7 +35,7 @@
|
|||
- "{{ awstats_data_dir }}"
|
||||
- "{{ apache_log_dir }}"
|
||||
|
||||
- name: Install the Apache config for AWStats (debuntu)
|
||||
- name: Install Apache's awstats.conf from template (debuntu)
|
||||
template:
|
||||
src: apache.conf
|
||||
dest: "/etc/{{ apache_config_dir }}/awstats.conf"
|
||||
|
@ -46,7 +44,7 @@
|
|||
mode: 0644
|
||||
when: awstats_enabled and is_debuntu
|
||||
|
||||
- name: Install the Apache config for AWStats (OS's other than debuntu)
|
||||
- name: Install Apache's awstats.conf from template (OS's other than debuntu)
|
||||
template:
|
||||
src: apache-awstats.conf
|
||||
dest: "/etc/{{ apache_config_dir }}/awstats.conf"
|
||||
|
@ -55,35 +53,35 @@
|
|||
mode: 0644
|
||||
when: awstats_enabled and not is_debuntu
|
||||
|
||||
- name: Make sure logrotate does not make logs unreadable (debuntu)
|
||||
- name: Ensure logrotate doesn't make logs unreadable (debuntu)
|
||||
template:
|
||||
src: logrotate.d.apache2
|
||||
dest: /etc/logrotate.d/apache2
|
||||
when: is_debuntu
|
||||
|
||||
- name: See if AWStats package installed a config file
|
||||
- name: Check if package installed /etc/awstats/awstats.conf
|
||||
stat:
|
||||
path: /etc/awstats/awstats.conf
|
||||
register: awstats
|
||||
|
||||
- name: If there was a config file installed by package, move it aside
|
||||
- name: If so, move it aside to /etc/awstats/awstats.conf.dist
|
||||
command: mv /etc/awstats/awstats.conf /etc/awstats/awstats.conf.dist
|
||||
when: awstats.stat.islnk is defined and not awstats.stat.islnk
|
||||
|
||||
- name: Enable AWStats (debuntu)
|
||||
- name: Create symlink awstats.conf from sites-enabled to sites-available (debuntu)
|
||||
file:
|
||||
src: /etc/apache2/sites-available/awstats.conf
|
||||
path: /etc/apache2/sites-enabled/awstats.conf
|
||||
state: link
|
||||
when: awstats_enabled and is_debuntu
|
||||
|
||||
- name: Disable AWStats (debuntu)
|
||||
- name: Remove symlink from sites-enabled, to disable AWStats (debuntu)
|
||||
file:
|
||||
path: /etc/apache2/sites-enabled/awstats.conf
|
||||
state: absent
|
||||
when: not awstats_enabled and is_debuntu
|
||||
|
||||
- name: Install the AWStats config
|
||||
- name: Install /etc/awstats/awstats.schoolserver.conf
|
||||
template:
|
||||
src: awstats.schoolserver.conf.j2
|
||||
dest: /etc/awstats/awstats.schoolserver.conf
|
||||
|
@ -92,10 +90,10 @@
|
|||
mode: 0644
|
||||
when: awstats_enabled
|
||||
|
||||
- name: Create a symbolic link to use when access is by IP address
|
||||
- name: Create a symlink /etc/awstats/awstats.conf for access by IP address
|
||||
file:
|
||||
src: /etc/awstats/awstats.schoolserver.conf
|
||||
dest: /etc/awstats/awstats.conf
|
||||
path: /etc/awstats/awstats.conf
|
||||
state: link
|
||||
when: awstats_enabled
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue