fastd.yml 763 B

12345678910111213141516171819202122232425
  1. ---
  2. - name: Install fastd via Apt
  3. apt: name=fastd state=latest default_release={{ ansible_distribution_release }}-backports
  4. - name: Add fastd user
  5. user: name=fastd system=yes home=/etc/fastd createhome=no
  6. - name: Create fastd config directories
  7. file: path=/etc/fastd/{{item.name}}/dummy state=directory
  8. with_items: "{{fastd_instances}}"
  9. - name: Create fastd configs
  10. template: src=fastd.conf.j2 dest=/etc/fastd/{{item.name}}/fastd.conf
  11. with_items: "{{fastd_instances}}"
  12. notify: Restart fastd
  13. - name: Create fastd secrets
  14. template: src=secret.conf.j2 dest=/etc/fastd/{{item.name}}/secret.conf
  15. with_items: "{{fastd_instances}}"
  16. notify: Restart fastd
  17. - name: Ensure fastd is enabled
  18. service: name=fastd enabled=yes
  19. notify: Restart fastd