introduce pigz

This commit is contained in:
YAMASAKI Masahide 2013-10-12 23:00:24 +09:00
parent c9bc02969f
commit de70bcb62d
10 changed files with 26 additions and 10 deletions

View File

@ -5,6 +5,7 @@
- seeder
- peer
sudo: yes
#serial: 100
roles:
- murder/peer

View File

@ -1,10 +1,10 @@
# The global variable file
# deploy tag
tag: deploy_test1
tag: deploy_test2
# path
seeder_files_path: ~/roles
seeder_files_path: ~/builds
destination_path: /tmp
# path permission

View File

@ -3,7 +3,6 @@
[ansible_host]
localhost ansible_connection=local
# tracker node
[tracker]
10.0.0.1

9
rm_tgz.yml Normal file
View File

@ -0,0 +1,9 @@
- name: rm_tgz
gather_facts: no
hosts: peer
sudo: yes
roles:
- murder/rm_tgz

View File

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

View File

@ -1,6 +1,6 @@
- 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"
tags: create_tgz

View File

@ -33,6 +33,6 @@
tags: peer
- name: tar xf
shell: tar xf {{ filename }} -C "{{ destination_path }}"
shell: unpigz -c {{ filename }} | tar -x -C "{{ destination_path }}"
tags: peer

View File

@ -4,7 +4,7 @@
roles:
- admin/clone_murder_files
- name: Upload the support files
- name: Upload the support files and install pigz
hosts:
- tracker
- seeder
@ -12,6 +12,7 @@
sudo: yes
roles:
- admin/distribute_files
- admin/pigz
- name: install screen
hosts:

View File

@ -1,6 +1,6 @@
---
- setup.yml
- create_torrent.yml
- deploy.yml
- stop_seeder_and_tracker.yml
- include: setup.yml
- include: create_torrent.yml
- include: deploy.yml
- include: stop_seeder_and_tracker.yml

View File

@ -1,6 +1,7 @@
- name: start tracker
hosts: tracker
gather_facts: no
sudo: yes
roles:
- admin/start_tracker