1
0
Fork 0
mirror of https://github.com/iiab/iiab.git synced 2025-03-09 15:40:17 +00:00

indentation/syntax per new Ansible documentation

This commit is contained in:
A Holt 2018-02-11 17:01:40 -05:00 committed by GitHub
parent fee3cd049d
commit 6b1f58b066
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,6 +1,7 @@
- name: Install AWStats package - name: Install AWStats package
package: name={{ item }} package:
state=present name: "{{ item }}"
state: present
with_items: with_items:
- awstats - awstats
- pwauth - pwauth
@ -9,8 +10,9 @@
- download - download
- name: Install AWStats package (debuntu) - name: Install AWStats package (debuntu)
package: name={{ item }} package:
state=present name: "{{ item }}"
state: present
with_items: with_items:
- libapache2-mod-authnz-external - libapache2-mod-authnz-external
- apache2-utils - apache2-utils
@ -18,74 +20,82 @@
tags: tags:
- download - download
- name: enable cgi execution (debuntu) - name: Enable cgi execution (debuntu)
command: a2enmod cgi command: a2enmod cgi
when: is_debuntu when: is_debuntu
- name: Create directory for AWStats to use as intermediate summary storage - name: Create directory for AWStats to use as intermediate summary storage
file: path={{ item }} file:
mode=0750 path: "{{ item }}"
owner={{ apache_user }} mode: 0750
group={{ apache_user }} owner: "{{ apache_user }}"
state=directory group: "{{ apache_user }}"
force=true state: directory
force: true
with_items: with_items:
- "{{ awstats_data_dir }}" - "{{ awstats_data_dir }}"
- "{{ apache_log_dir }}" - "{{ apache_log_dir }}"
- name: Install the Apache config for AWStats (debuntu) - name: Install the Apache config for AWStats (debuntu)
template: src=apache.conf template:
dest=/etc/{{ apache_config_dir }}/awstats.conf src: apache.conf
owner=root dest: "/etc/{{ apache_config_dir }}/awstats.conf"
group=root owner: root
mode=0644 group: root
mode: 0644
when: awstats_enabled and is_debuntu when: awstats_enabled and is_debuntu
- name: Install the Apache config for AWStats (OS's other than debuntu) - name: Install the Apache config for AWStats (OS's other than debuntu)
template: src=apache-awstats.conf template:
dest=/etc/{{ apache_config_dir }}/awstats.conf src: apache-awstats.conf
owner=root dest: "/etc/{{ apache_config_dir }}/awstats.conf"
group=root owner: root
mode=0644 group: root
mode: 0644
when: awstats_enabled and not is_debuntu when: awstats_enabled and not is_debuntu
- name: make sure logrotate does not make logs unreadable (debuntu) - name: Make sure logrotate does not make logs unreadable (debuntu)
template: src=logrotate.d.apache2 template:
dest=/etc/logrotate.d/apache2 src: logrotate.d.apache2
dest: /etc/logrotate.d/apache2
when: is_debuntu when: is_debuntu
- name: See if awstats package installed a config file - name: See if AWStats package installed a config file
stat: path=/etc/awstats/awstats.conf stat:
path: /etc/awstats/awstats.conf
register: awstats register: awstats
- name: If there was a config file installed by package, move it aside - name: If there was a config file installed by package, move it aside
command: mv /etc/awstats/awstats.conf /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 when: awstats.stat.islnk is defined and not awstats.stat.islnk
- name: Enable AWStats (debuntu) - name: Enable AWStats (debuntu)
file: src=/etc/apache2/sites-available/awstats.conf file:
path=/etc/apache2/sites-enabled/awstats.conf src: /etc/apache2/sites-available/awstats.conf
state=link path: /etc/apache2/sites-enabled/awstats.conf
state: link
when: awstats_enabled and is_debuntu when: awstats_enabled and is_debuntu
- name: Disable AWStats (debuntu) - name: Disable AWStats (debuntu)
file: path=/etc/apache2/sites-enabled/awstats.conf file:
state=absent path: /etc/apache2/sites-enabled/awstats.conf
state: absent
when: not awstats_enabled and is_debuntu when: not awstats_enabled and is_debuntu
- name: Install the AWStats config - name: Install the AWStats config
template: src=awstats.schoolserver.conf.j2 template:
dest=/etc/awstats/awstats.schoolserver.conf src: awstats.schoolserver.conf.j2
owner=root dest: /etc/awstats/awstats.schoolserver.conf
group=root owner: root
mode=0644 group: root
mode: 0644
when: awstats_enabled when: awstats_enabled
- name: Create a symbolic link to use when access is by IP address - name: Create a symbolic link to use when access is by IP address
file: src=/etc/awstats/awstats.schoolserver.conf file:
dest=/etc/awstats/awstats.conf src: /etc/awstats/awstats.schoolserver.conf
state=link dest: /etc/awstats/awstats.conf
state: link
when: awstats_enabled when: awstats_enabled
- name: On first enabling of AWStats, summarize httpd logs up to now (OS's other than debuntu) - name: On first enabling of AWStats, summarize httpd logs up to now (OS's other than debuntu)