main.yml 840 B

12345678910111213141516171819202122232425262728293031
  1. ---
  2. # tasks file for fastd
  3. - include: debian.yml
  4. when: ansible_distribution == "Ubuntu"
  5. - include: debian.yml
  6. when: ansible_distribution == "Debian"
  7. - name: Create fastd config directories
  8. file: path=/etc/fastd/{{item.name}}/dummy state=directory recurse=yes
  9. with_items:
  10. - "{{fastd_instances}}"
  11. - name: Create fastd configs
  12. template: src=fastd.conf.j2 dest=/etc/fastd/{{item.name}}/fastd.conf
  13. with_items:
  14. - "{{fastd_instances}}"
  15. notify: Restart fastd
  16. - name: Create fastd secrets
  17. template: src=secret.conf.j2 dest=/etc/fastd/{{item.name}}/secret.conf
  18. with_items:
  19. - "{{fastd_instances_secret}}"
  20. notify: Restart fastd
  21. - name: rng-tools need to run
  22. service: name=rng-tools state=started enabled=yes pattern=/usr/sbin/rngd
  23. - name: fastd needs to autostart
  24. service: name=fastd enabled=yes state=started