blacklist.yml 661 B

12345678910111213141516171819
  1. ---
  2. - name: Check if blacklist file exists
  3. stat: path=/etc/fastd/fastd-blacklist.json
  4. register: blacklist
  5. - name: Ensure blacklist file exists
  6. file: name=/etc/fastd/fastd-blacklist.json state=touch owner=fastd
  7. when: not blacklist.stat.exists
  8. - name: Install crontab to update the blacklist
  9. cron:
  10. name: Update fastd blacklist
  11. cron_file: fastd-blacklist
  12. user: fastd
  13. minute: '*/5'
  14. job: curl -s -o /etc/fastd/fastd-blacklist.json https://raw.githubusercontent.com/ffruhr/fastdbl/master/fastd-blacklist.json
  15. - name: Install verify shell script
  16. copy: src=fastd-blacklist.sh dest=/etc/fastd/fastd-blacklist.sh mode="u=rwx,g=rx,o=rx"