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 - seeder
- peer - peer
sudo: yes sudo: yes
#serial: 100
roles: roles:
- murder/peer - murder/peer

View File

@ -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

View File

@ -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
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 - 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

View File

@ -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

View File

@ -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:

View File

@ -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

View File

@ -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