diff options
author | Matthieu Saulnier <fantom@fedoraproject.org> | 2018-07-15 21:38:55 +0200 |
---|---|---|
committer | Matthieu Saulnier <fantom@fedoraproject.org> | 2018-07-15 21:38:55 +0200 |
commit | 0f0f5dc291d8c649e205fb29e3b6b8cd9c254395 (patch) | |
tree | 9b1a1ee9f6e57571142b47182342e51be013590a /roles/bittorrent/tasks/update.yml | |
parent | a625df4e82152239f388c170e2c1720d865f124d (diff) | |
download | playbooks-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.yml | 21 |
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 |