add screen and introduce changed_when

This commit is contained in:
YAMASAKI Masahide 2013-10-12 00:44:02 +09:00
parent 1980cf4bce
commit 255a250d59
7 changed files with 28 additions and 2 deletions

View File

@ -0,0 +1,5 @@
- name: install screen
yum: name=screen state=latest
tags: screen

View File

@ -1,5 +1,8 @@
- name: stop all peering
shell: pkill -f "murder_client.py peer"
register: result
failed_when: result.rc not in [0, 1]
changed_when: result.rc not in [0, 1]
tags: stop_all_peering

View File

@ -1,5 +1,8 @@
- name: stop all seeding
shell: pkill -f "SCREEN.*seeder-"
register: result
failed_when: result.rc not in [0, 1]
changed_when: result.rc not in [0, 1]
tags: stop_all_seeding

View File

@ -1,5 +1,8 @@
- name: stop tracker
shell: pkill -f 'SCREEN.*murder_tracker.py'
register: result
failed_when: result.rc not in [0, 1]
changed_when: result.rc not in [0, 1]
tags: stop_tracker

View File

@ -1,4 +1,7 @@
- name: stop seeding
shell: pkill -f "SCREEN.*seeder-{{ tag }}"
register: result
failed_when: result.rc not in [0, 1]
changed_when: result.rc not in [0, 1]
tags: stop_seeding

View File

@ -1,3 +1,4 @@
- name: get distribute_files
hosts: ansible_host
roles:
@ -8,7 +9,15 @@
- tracker
- seeder
- peer
#sudo: yes
sudo: yes
roles:
- admin/distribute_files
- name: install screen
hosts:
- tracker
- seeder
sudo: yes
roles:
- admin/screen

View File

@ -1,5 +1,5 @@
---
- distribute_files.yml
- setup.yml
- create_torrent.yml
- deploy.yml
- stop_seeder_and_tracker.yml