summaryrefslogtreecommitdiffstats
path: root/roles/lists/tasks/mlmmj.yml
blob: 45fc8f43fd49481908413cb015489b3df266b94f (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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
- name: Install MLMMJ
  apt: pkg={{ item }}
  with_items:
    - mlmmj

# Weird the debian package doesn't do it by itself...
- name: Create a user 'mlmmj'
  user: name=mlmmj system=yes
        createhome=no
        home=/var/spool/mlmmj
        shell=/usr/sbin/nologin
        password=!
        state=present

- name: Add 'www-data' to the group 'mlmmj'
  user: name=www-data groups=mlmmj append=yes

- name: Create a home directory for user 'mlmmj'
  file: path=/var/spool/mlmmj
        state=directory
        owner=mlmmj group=mlmmj
        mode=0700

- name: Create /var/lib/mlmmj
  file: path=/var/lib/mlmmj
        state=directory
        owner=mlmmj group=mlmmj
        mode=0750

- name: Auto-maintain mlmmj's spool directory
  copy: src=etc/cron.d/mlmmj
        dest=/etc/cron.d/mlmmj
        owner=root group=root
        mode=0644

- name: Copy mlmmj-newlist.sh and mhonarc-scan.sh
  copy: src=usr/local/bin/{{ item }}
        dest=/usr/local/bin/{{ item }}
        owner=root group=staff
        mode=0755
  with_items:
    - mlmmj-newlist.sh
    - mhonarc-scan.sh

- name: Copy /etc/mhonarc.rc
  copy: src=etc/mhonarc.rc
        dest=/etc/mhonarc.rc
        owner=root group=root
        mode=0644

- name: Create /usr/share/mlmmj/static/{css,fonts}
  file: path=/usr/share/mlmmj/static/{{ item }}
        state=directory
        owner=root group=root
        mode=0755
  with_items:
    - css
    - fonts

- name: Copy CSS files
  copy: src=usr/share/mlmmj/static/css/{{ item }}
        dest=/usr/share/mlmmj/static/css/{{ item }}
        owner=root group=root
        mode=0644
  with_items:
    - bootstrap.min.css
    - fripost.css

- name: Copy Glyphicon Halflings
  copy: src=usr/share/mlmmj/static/fonts/{{ item }}
        dest=/usr/share/mlmmj/static/fonts/{{ item }}
        owner=root group=root
        mode=0644
  with_items:
    - glyphicons-halflings-regular.eot
    - glyphicons-halflings-regular.svg
    - glyphicons-halflings-regular.ttf
    - glyphicons-halflings-regular.woff

- name: Create /usr/lib/cgi-bin/mlmmj
  file: path=/usr/lib/cgi-bin/mlmmj
        state=directory
        owner=root group=root
        mode=0755