-
Notifications
You must be signed in to change notification settings - Fork 2
/
ai.yml
39 lines (31 loc) · 1.48 KB
/
ai.yml
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
- hosts: www
vars:
env: tinyvz
usr: logbot
sudo: yes
tasks:
#---------------------------------------------------------------------------
#
# U S E R
#
# By default, Ubuntu Lucid only lets the adm group read the logs and
# /dev/xconsole. Perfect for what the ai logbot does.
#
#---------------------------------------------------------------------------
- user: name={{usr}} group=adm createhome=yes
- file: path=/home/{{usr}}/offsets state=directory group=adm owner=logbot mode=750
- file: path=/home/{{usr}}/bin state=directory group=adm owner=logbot mode=755
#---------------------------------------------------------------------------
#
# C O P Y F I L E S
#
#---------------------------------------------------------------------------
- copy: src=stoplist.{{env}} dest=/home/{{usr}}/bin/stoplist owner=logbot group=adm mode=644
- copy: src=stopfiles.{{env}} dest=/home/{{usr}}/bin/stopfiles owner=logbot group=adm mode=644
- copy: src=ai.sh dest=/home/{{usr}}/bin/ai.sh owner=logbot group=adm mode=755
#---------------------------------------------------------------------------
#
# P U T I N C R O N
#
#---------------------------------------------------------------------------
- cron: user=logbot name="Artificial Ignorance" minute="0" job="/home/{{usr}}/bin/ai.sh"