main.yml 751 B

12345678910111213141516171819202122232425262728
  1. ---
  2. # tasks file for ffdo.bird
  3. - name: Ensure bird routing daemon is installed
  4. apt: name=bird state=present update_cache=yes cache_valid_time=3600
  5. - name: Ensure bird config dir exists
  6. file: name={{bird_config_dir}} state=directory
  7. - name: Ensure bird include dirs exists
  8. file: name={{bird_config_dir}}/{{item}} state=directory
  9. with_items:
  10. - conf.d
  11. - conf6.d
  12. - name: Install bird.conf
  13. template: src=bird.conf.j2 dest={{bird_config_dir}}/bird.conf
  14. notify: Reload bird daemons
  15. - name: Install bird6.conf
  16. template: src=bird6.conf.j2 dest={{bird_config_dir}}/bird6.conf
  17. notify: Reload bird daemons
  18. - name: Enable and start bird and bird6
  19. service: name={{item}} state=started enabled=yes
  20. with_items:
  21. - bird
  22. - bird6