introduce pigz
This commit is contained in:
parent
c9bc02969f
commit
de70bcb62d
@ -5,6 +5,7 @@
|
||||
- seeder
|
||||
- peer
|
||||
sudo: yes
|
||||
#serial: 100
|
||||
roles:
|
||||
- murder/peer
|
||||
|
||||
|
@ -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
|
||||
|
@ -3,7 +3,6 @@
|
||||
[ansible_host]
|
||||
localhost ansible_connection=local
|
||||
|
||||
|
||||
# tracker node
|
||||
[tracker]
|
||||
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
|
||||
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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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:
|
||||
|
8
site.yml
8
site.yml
@ -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
|
||||
|
||||
|
@ -1,6 +1,7 @@
|
||||
|
||||
- name: start tracker
|
||||
hosts: tracker
|
||||
gather_facts: no
|
||||
sudo: yes
|
||||
roles:
|
||||
- admin/start_tracker
|
||||
|
Loading…
Reference in New Issue
Block a user