summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthieu Saulnier <fantom@fedoraproject.org>2018-11-22 18:53:01 +0100
committerMatthieu Saulnier <fantom@fedoraproject.org>2018-11-22 18:53:01 +0100
commit68d906649db90ef182c9ce43db2df1b05e5115a5 (patch)
tree6665b98b90a43fdb7b00c0e0b76b7842d258bac0
parent7518e1e6cdce302b21214b432e1a61556a301f91 (diff)
downloadplaybooks-ansible-68d906649db90ef182c9ce43db2df1b05e5115a5.tar.gz
playbooks-ansible-68d906649db90ef182c9ce43db2df1b05e5115a5.tar.xz
playbooks-ansible-68d906649db90ef182c9ce43db2df1b05e5115a5.zip
Set speed limits into variables
-rw-r--r--host_vars/192.168.0.256
-rw-r--r--host_vars/d72vewh3wa4lwpaj.onion6
-rw-r--r--host_vars/manchester.casperlefantom.net6
-rw-r--r--host_vars/manchester.home.casperlefantom.net6
-rw-r--r--roles/bittorrent/defaults/main.yml4
-rw-r--r--roles/bittorrent/tasks/config.yml8
6 files changed, 32 insertions, 4 deletions
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