add screen and introduce changed_when
This commit is contained in:
parent
1980cf4bce
commit
255a250d59
5
roles/admin/screen/tasks/main.yml
Normal file
5
roles/admin/screen/tasks/main.yml
Normal file
@ -0,0 +1,5 @@
|
||||
|
||||
- name: install screen
|
||||
yum: name=screen state=latest
|
||||
tags: screen
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user