-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsetup.yml
58 lines (45 loc) · 1.61 KB
/
setup.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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
---
- hosts: newsbuddy-workers
remote_user: root
tasks:
- name: create users
user: name=archiveteam
- name: install prereq packages
apt: pkg={{item}} state=installed update_cache=yes
with_items:
- git
- build-essential
- python3-dev
- python3-pip
- youtube-dl
- sudo
- screen
- name: install pip via easy_install
easy_install: name=pip
- name: create directory structure
file: path=/home/archiveteam/newsbuddy state=directory mode=0755 owner=archiveteam group=archiveteam
file: path=/home/archiveteam/newsbuddy/new_lists state=directory mode=0755 owner=archiveteam group=archiveteam
- name: install rsync target pointer
copy: src=templates/rsync_target dest=/home/archiveteam/newsbuddy
- name: install rsyncd config
copy: src=templates/rsyncd.conf dest=/etc/rsyncd.conf
- name: restart rsyncd
service: name=rsync state=started
- name: install grab-site
pip: name='git+https://github.com/ludios/grab-site.git#egg=grab-site' executable=pip3
- name: deploy worker script
git: repo=https://github.com/ArchiveTeam/NewsGrabber.git dest=/home/archiveteam/NewsGrabber
become: yes
become_user: archiveteam
- name: symlink worker file
file: src=/home/archiveteam/NewsGrabber/worker.py dest=/home/archiveteam/newsbuddy/worker.py state=link
become: yes
become_user: archiveteam
- name: start worker process
command: screen -dm python worker.py
args:
chdir: /home/archiveteam/NewsGrabber/
become: yes
become_user: archiveteam
# - name: announce rsync target to irc
# script: scripts/irc.sh