summaryrefslogtreecommitdiffstats
path: root/roles/awstats_vhost/tasks/main.yml
blob: 8617ac555b9be4294edfacae54c4a33af8db0b98 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
---
- include_role:
    name: httpd
    tasks_from: vhost
  vars:
    website_domain: www.example.com
    document_root: /usr/share/awstats/wwwroot/
    use_letsencrypt: True
    redirects:
    - src: '^/$'
      target: '/cgi-bin/awstats.pl'
      match: True

- name: Deploy custom config for awstats
  template:
    dest: "/etc/httpd/conf.d/{{ _website_domain }}.conf.d/awstats.conf"
    src: awstats.conf
  notify: verify config and restart httpd

- package:
    name: python-passlib
    state: present

- htpasswd:
    path: /etc/httpd/htpasswd
    name: "guest"
    password: "{{ awstats_guest_password }}"
    owner: root
    group: apache
    mode: 0640