summaryrefslogtreecommitdiffstats
path: root/roles/bittorrent/tasks/update.yml
diff options
context:
space:
mode:
authorMatthieu Saulnier <fantom@fedoraproject.org>2018-07-15 21:38:55 +0200
committerMatthieu Saulnier <fantom@fedoraproject.org>2018-07-15 21:38:55 +0200
commit0f0f5dc291d8c649e205fb29e3b6b8cd9c254395 (patch)
tree9b1a1ee9f6e57571142b47182342e51be013590a /roles/bittorrent/tasks/update.yml
parenta625df4e82152239f388c170e2c1720d865f124d (diff)
downloadplaybooks-ansible-0f0f5dc291d8c649e205fb29e3b6b8cd9c254395.tar.gz
playbooks-ansible-0f0f5dc291d8c649e205fb29e3b6b8cd9c254395.tar.xz
playbooks-ansible-0f0f5dc291d8c649e205fb29e3b6b8cd9c254395.zip
Create new bittorrent role
Diffstat (limited to 'roles/bittorrent/tasks/update.yml')
-rw-r--r--roles/bittorrent/tasks/update.yml21
1 files changed, 21 insertions, 0 deletions
diff --git a/roles/bittorrent/tasks/update.yml b/roles/bittorrent/tasks/update.yml
new file mode 100644
index 0000000..44a8498
--- /dev/null
+++ b/roles/bittorrent/tasks/update.yml
@@ -0,0 +1,21 @@
+- name: Récupération de la liste des torrents disponibles
+ shell: torsocks curl -sS https://torrents.fedoraproject.org/torrents/ | grep torrent | grep -v Index | awk '{ print $6 }' | cut -d '"' -f2 | sed 's/.torrent//'
+ args:
+ executable: /usr/bin/zsh
+ delegate_to: localhost
+ register: namefedora
+
+- name: Vérifier la présence de tous les torrents
+ shell: transmission-remote -l | grep '{{ item }}'
+ args:
+ executable: /usr/bin/zsh
+ with_items:
+ - "{{ namefedora.stdout_lines }}"
+ register: result
+ ignore_errors: yes
+
+- name: Mise à jour de transmission-daemon
+ command: transmission-remote -a https://torrents.fedoraproject.org/torrents/'{{ item }}'.torrent
+ with_items:
+ - "{{ namefedora.stdout_lines }}"
+ when: result is failed