introduce pigz
This commit is contained in:
parent
c9bc02969f
commit
de70bcb62d
@ -5,6 +5,7 @@
|
|||||||
- seeder
|
- seeder
|
||||||
- peer
|
- peer
|
||||||
sudo: yes
|
sudo: yes
|
||||||
|
#serial: 100
|
||||||
roles:
|
roles:
|
||||||
- murder/peer
|
- murder/peer
|
||||||
|
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
# The global variable file
|
# The global variable file
|
||||||
|
|
||||||
# deploy tag
|
# deploy tag
|
||||||
tag: deploy_test1
|
tag: deploy_test2
|
||||||
|
|
||||||
# path
|
# path
|
||||||
seeder_files_path: ~/roles
|
seeder_files_path: ~/builds
|
||||||
destination_path: /tmp
|
destination_path: /tmp
|
||||||
|
|
||||||
# path permission
|
# path permission
|
||||||
|
@ -3,7 +3,6 @@
|
|||||||
[ansible_host]
|
[ansible_host]
|
||||||
localhost ansible_connection=local
|
localhost ansible_connection=local
|
||||||
|
|
||||||
|
|
||||||
# tracker node
|
# tracker node
|
||||||
[tracker]
|
[tracker]
|
||||||
10.0.0.1
|
10.0.0.1
|
||||||
|
9
rm_tgz.yml
Normal file
9
rm_tgz.yml
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
|
||||||
|
|
||||||
|
- name: rm_tgz
|
||||||
|
gather_facts: no
|
||||||
|
hosts: peer
|
||||||
|
sudo: yes
|
||||||
|
roles:
|
||||||
|
- murder/rm_tgz
|
||||||
|
|
5
roles/admin/pigz/tasks/main.yml
Normal file
5
roles/admin/pigz/tasks/main.yml
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
|
||||||
|
- name: yum install pigz
|
||||||
|
yum: name=pigz state=latest
|
||||||
|
tags: pigz
|
||||||
|
|
@ -1,6 +1,6 @@
|
|||||||
|
|
||||||
- name: create tar.gz
|
- name: create tar.gz
|
||||||
shell: tar -c -z -C {{ seeder_files_path }}/ -f {{ filename }} {{ tar_options }} .
|
shell: tar -c -C {{ seeder_files_path }}/ {{ tar_options }} .|pigz > {{ filename }}
|
||||||
when: node_type == "seeder"
|
when: node_type == "seeder"
|
||||||
tags: create_tgz
|
tags: create_tgz
|
||||||
|
|
||||||
|
@ -33,6 +33,6 @@
|
|||||||
tags: peer
|
tags: peer
|
||||||
|
|
||||||
- name: tar xf
|
- name: tar xf
|
||||||
shell: tar xf {{ filename }} -C "{{ destination_path }}"
|
shell: unpigz -c {{ filename }} | tar -x -C "{{ destination_path }}"
|
||||||
tags: peer
|
tags: peer
|
||||||
|
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
roles:
|
roles:
|
||||||
- admin/clone_murder_files
|
- admin/clone_murder_files
|
||||||
|
|
||||||
- name: Upload the support files
|
- name: Upload the support files and install pigz
|
||||||
hosts:
|
hosts:
|
||||||
- tracker
|
- tracker
|
||||||
- seeder
|
- seeder
|
||||||
@ -12,6 +12,7 @@
|
|||||||
sudo: yes
|
sudo: yes
|
||||||
roles:
|
roles:
|
||||||
- admin/distribute_files
|
- admin/distribute_files
|
||||||
|
- admin/pigz
|
||||||
|
|
||||||
- name: install screen
|
- name: install screen
|
||||||
hosts:
|
hosts:
|
||||||
|
8
site.yml
8
site.yml
@ -1,6 +1,6 @@
|
|||||||
---
|
---
|
||||||
- setup.yml
|
- include: setup.yml
|
||||||
- create_torrent.yml
|
- include: create_torrent.yml
|
||||||
- deploy.yml
|
- include: deploy.yml
|
||||||
- stop_seeder_and_tracker.yml
|
- include: stop_seeder_and_tracker.yml
|
||||||
|
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
|
|
||||||
- name: start tracker
|
- name: start tracker
|
||||||
hosts: tracker
|
hosts: tracker
|
||||||
|
gather_facts: no
|
||||||
sudo: yes
|
sudo: yes
|
||||||
roles:
|
roles:
|
||||||
- admin/start_tracker
|
- admin/start_tracker
|
||||||
|
Loading…
Reference in New Issue
Block a user