main.yml 765 B

123456789101112131415161718192021222324252627282930
  1. ---
  2. # tasks file for bird
  3. - include_vars: "{{ ansible_distribution }}-{{ ansible_distribution_release }}.yml"
  4. - include: debian.yml
  5. when: ansible_distribution == "Debian"
  6. - include: debian.yml
  7. when: ansible_distribution == "Ubuntu"
  8. - name: Create bird config dir
  9. file: name={{bird_config_dir}} state=directory
  10. - name: Install bird.conf
  11. when: bird_configure
  12. template: src=bird.conf.j2 dest={{bird_config_dir}}/bird.conf
  13. notify: Restart bird daemons
  14. - name: Install bird6.conf
  15. when: bird_configure
  16. template: src=bird6.conf.j2 dest={{bird_config_dir}}/bird6.conf
  17. notify: Restart bird daemons
  18. - name: Enable and start bird and bird6
  19. when: bird_configure
  20. service: name={{item}} state=started enabled=yes
  21. with_items:
  22. - bird
  23. - bird6