fastd.yml 949 B

123456789101112131415161718192021222324252627282930313233
  1. ---
  2. - name: Ensure Universe Factory repository key is installed
  3. apt_key:
  4. id: CB201D9C
  5. data: "{{ lookup('file', 'fastd.gpg') }}"
  6. - name: Add Universe Factory Apt Repository
  7. apt_repository: repo='deb http://repo.universe-factory.net/debian/ sid main'
  8. - name: Install fastd via Apt
  9. apt: name=fastd
  10. - name: Add fastd user
  11. user: name=fastd system=yes home=/etc/fastd createhome=no
  12. - name: Create fastd config directories
  13. file: path=/etc/fastd/{{item.name}}/dummy state=directory
  14. with_items: "{{fastd_instances}}"
  15. - name: Create fastd configs
  16. template: src=fastd.conf.j2 dest=/etc/fastd/{{item.name}}/fastd.conf
  17. with_items: "{{fastd_instances}}"
  18. notify: Restart fastd
  19. - name: Create fastd secrets
  20. template: src=secret.conf.j2 dest=/etc/fastd/{{item.name}}/secret.conf
  21. with_items: "{{fastd_instances}}"
  22. notify: Restart fastd
  23. - name: Ensure fastd is enabled
  24. service: name=fastd enabled=yes
  25. notify: Restart fastd