mirror of
https://github.com/iiab/iiab.git
synced 2025-02-13 03:32:12 +00:00
* change apache_data to apache_user in all * no libapach2 in centos. just php. no php-magick in centos * remove redundant vars entries * do not create apache user * missed one pound sign * soft code all references to apache_user * centos requires older setuptools * revert ansible_lsb.id in xsce.yml * try getting recent pip * move pip download to 2prep so that kalite success is not dependent on iiab coming first * still need to replace setuptools in kalite * add curl -- needed in debian * massivly substitue iiab for xsce, and rename files * completed runansible * centos fixes,install pip * appliance means no iptables rules * change to earlier version of setuptools for centos * delete file duplicate, hopefully unnecessary. generate the offline docs * wiki docs errors * create the admin group -- deleted earlier * use the --yes option with pip uninstall * base of repo moved from schoolserver to iiab, unleashkids.org->iiab.io * network detection broken due to tupo
99 lines
2.9 KiB
YAML
99 lines
2.9 KiB
YAML
- name: Install awstats package
|
|
package: name={{ item }}
|
|
state=present
|
|
with_items:
|
|
- awstats
|
|
- pwauth
|
|
- openssl
|
|
tags:
|
|
- download
|
|
|
|
- name: Install awstats package
|
|
package: name={{ item }}
|
|
state=present
|
|
with_items:
|
|
- libapache2-mod-authnz-external
|
|
- apache2-utils
|
|
when: is_debuntu
|
|
tags:
|
|
- download
|
|
|
|
- name: enable cgi execution
|
|
command: a2enmod cgi
|
|
when: is_debuntu
|
|
|
|
- name: Create directory for awstat to use as intermediate summary storage
|
|
file: path={{ item }}
|
|
mode=0750
|
|
owner={{ apache_user }}
|
|
group={{ apache_user }}
|
|
state=directory
|
|
force=true
|
|
with_items:
|
|
- "{{ awstats_data_dir }}"
|
|
- "{{ apache_log_dir }}"
|
|
|
|
- name: Install the Apache config for Advanced Web Statistics
|
|
template: src=apache.conf
|
|
dest=/etc/{{ apache_config_dir }}/awstats.conf
|
|
owner=root
|
|
group=root
|
|
mode=0644
|
|
when: awstats_enabled and is_debuntu
|
|
|
|
- name: Install the Apache config for Advanced Web Statistics
|
|
template: src=apache-awstats.conf
|
|
dest=/etc/{{ apache_config_dir }}/awstats.conf
|
|
owner=root
|
|
group=root
|
|
mode=0644
|
|
when: awstats_enabled and not is_debuntu
|
|
|
|
- name: make sure logrotate does not make logs unreadable
|
|
template: src=logrotate.d.apache2
|
|
dest=/etc/logrotate.d/apache2
|
|
when: is_debuntu
|
|
|
|
- name: See if awstats package installed a config file
|
|
stat: path=/etc/awstats/awstats.conf
|
|
register: awstats
|
|
|
|
- debug: var=awstats
|
|
|
|
- name: If there was a config file installed by package, move it aside
|
|
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
|
|
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
|
|
file: path=/etc/apache2/sites-enabled/awstats.conf
|
|
state=absent
|
|
when: not awstats_enabled and is_debuntu
|
|
|
|
- name: Install the awstats config for Advanced Web Statistics
|
|
template: src=awstats.schoolserver.conf.j2
|
|
dest=/etc/awstats/awstats.schoolserver.conf
|
|
owner=root
|
|
group=root
|
|
mode=0644
|
|
when: awstats_enabled
|
|
|
|
- name: Create a symbolic link to use when access is by ip address
|
|
file: src=/etc/awstats/awstats.schoolserver.conf
|
|
dest=/etc/awstats/awstats.conf
|
|
state=link
|
|
when: awstats_enabled
|
|
|
|
- name: On first enabling of awstats, summarize httpd logs up to now
|
|
shell: /bin/perl /usr/share/awstats/wwwroot/cgi-bin/awstats.pl -config=schoolserver -update
|
|
when: awstats_enabled and not is_debuntu
|
|
|
|
- name: On first enabling of awstats, summarize httpd logs up to now
|
|
shell: /usr/bin/perl /usr/lib/cgi-bin/awstats.pl -config=schoolserver -update
|
|
when: awstats_enabled and is_debuntu
|
|
|