From 68d906649db90ef182c9ce43db2df1b05e5115a5 Mon Sep 17 00:00:00 2001 From: Matthieu Saulnier Date: Thu, 22 Nov 2018 18:53:01 +0100 Subject: Set speed limits into variables --- host_vars/192.168.0.25 | 6 ++++++ host_vars/d72vewh3wa4lwpaj.onion | 6 ++++++ host_vars/manchester.casperlefantom.net | 6 ++++++ host_vars/manchester.home.casperlefantom.net | 6 ++++++ roles/bittorrent/defaults/main.yml | 4 ++++ roles/bittorrent/tasks/config.yml | 8 ++++---- 6 files changed, 32 insertions(+), 4 deletions(-) create mode 100644 roles/bittorrent/defaults/main.yml diff --git a/host_vars/192.168.0.25 b/host_vars/192.168.0.25 index fcf0fec..fc92c48 100644 --- a/host_vars/192.168.0.25 +++ b/host_vars/192.168.0.25 @@ -3,6 +3,7 @@ is_ntpmaster: true is_bridge: true is_mtamaster: true is_tormaster: true +# reverseproxy domainhttps: - admin.casperlefantom.net - nsa.casperlefantom.net @@ -36,3 +37,8 @@ peers: peerssl: - [ '8086', 'onion2', 'vhost_onion2', 'lfa3azuyprfdawxf.onion' ] - [ '8088', 'jays-site', 'vhost_jays-site', 'jaysfoodventure.com www.jaysfoodventure.com admin.jaysfoodventure.com' ] +# bittorrent +downspeed: 400 +upspeed: 40 +altdownspeed: 0 +altupspeed: 0 diff --git a/host_vars/d72vewh3wa4lwpaj.onion b/host_vars/d72vewh3wa4lwpaj.onion index fcf0fec..fc92c48 100644 --- a/host_vars/d72vewh3wa4lwpaj.onion +++ b/host_vars/d72vewh3wa4lwpaj.onion @@ -3,6 +3,7 @@ is_ntpmaster: true is_bridge: true is_mtamaster: true is_tormaster: true +# reverseproxy domainhttps: - admin.casperlefantom.net - nsa.casperlefantom.net @@ -36,3 +37,8 @@ peers: peerssl: - [ '8086', 'onion2', 'vhost_onion2', 'lfa3azuyprfdawxf.onion' ] - [ '8088', 'jays-site', 'vhost_jays-site', 'jaysfoodventure.com www.jaysfoodventure.com admin.jaysfoodventure.com' ] +# bittorrent +downspeed: 400 +upspeed: 40 +altdownspeed: 0 +altupspeed: 0 diff --git a/host_vars/manchester.casperlefantom.net b/host_vars/manchester.casperlefantom.net index fcf0fec..fc92c48 100644 --- a/host_vars/manchester.casperlefantom.net +++ b/host_vars/manchester.casperlefantom.net @@ -3,6 +3,7 @@ is_ntpmaster: true is_bridge: true is_mtamaster: true is_tormaster: true +# reverseproxy domainhttps: - admin.casperlefantom.net - nsa.casperlefantom.net @@ -36,3 +37,8 @@ peers: peerssl: - [ '8086', 'onion2', 'vhost_onion2', 'lfa3azuyprfdawxf.onion' ] - [ '8088', 'jays-site', 'vhost_jays-site', 'jaysfoodventure.com www.jaysfoodventure.com admin.jaysfoodventure.com' ] +# bittorrent +downspeed: 400 +upspeed: 40 +altdownspeed: 0 +altupspeed: 0 diff --git a/host_vars/manchester.home.casperlefantom.net b/host_vars/manchester.home.casperlefantom.net index fcf0fec..fc92c48 100644 --- a/host_vars/manchester.home.casperlefantom.net +++ b/host_vars/manchester.home.casperlefantom.net @@ -3,6 +3,7 @@ is_ntpmaster: true is_bridge: true is_mtamaster: true is_tormaster: true +# reverseproxy domainhttps: - admin.casperlefantom.net - nsa.casperlefantom.net @@ -36,3 +37,8 @@ peers: peerssl: - [ '8086', 'onion2', 'vhost_onion2', 'lfa3azuyprfdawxf.onion' ] - [ '8088', 'jays-site', 'vhost_jays-site', 'jaysfoodventure.com www.jaysfoodventure.com admin.jaysfoodventure.com' ] +# bittorrent +downspeed: 400 +upspeed: 40 +altdownspeed: 0 +altupspeed: 0 diff --git a/roles/bittorrent/defaults/main.yml b/roles/bittorrent/defaults/main.yml new file mode 100644 index 0000000..d95d658 --- /dev/null +++ b/roles/bittorrent/defaults/main.yml @@ -0,0 +1,4 @@ +downspeed: 400 +upspeed: 400 +altdownspeed: 200 +altupspeed: 200 diff --git a/roles/bittorrent/tasks/config.yml b/roles/bittorrent/tasks/config.yml index 0fd37a7..c4afc27 100644 --- a/roles/bittorrent/tasks/config.yml +++ b/roles/bittorrent/tasks/config.yml @@ -1,14 +1,14 @@ - name: Limite down permanent - command: transmission-remote --downlimit 400 + command: transmission-remote --downlimit '{{ downspeed }}' - name: Limite up permanent - command: transmission-remote --uplimit 40 + command: transmission-remote --uplimit '{{ upspeed }}' - name: Limite down alternative - command: transmission-remote --alt-speed-downlimit 0 + command: transmission-remote --alt-speed-downlimit '{{ altdownspeed }}' - name: Limite up alternative - command: transmission-remote --alt-speed-uplimit 0 + command: transmission-remote --alt-speed-uplimit '{{ altupspeed }}' - name: Début limites alternatives command: transmission-remote --alt-speed-time-begin 0533 -- cgit