main.yml 883 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. ---
  2. - name: Install radvd package
  3. apt:
  4. name: 'radvd'
  5. state: 'latest'
  6. install_recommends: False
  7. - name: Create /etc/radvd.conf.d directory
  8. file:
  9. path: '/etc/radvd.conf.d'
  10. state: 'directory'
  11. owner: 'root'
  12. group: 'root'
  13. mode: '0755'
  14. - name: Create configuration header
  15. template:
  16. src: 'etc/radvd.conf.d/00_ansible.j2'
  17. dest: '/etc/radvd.conf.d/00_ansible'
  18. owner: 'root'
  19. group: 'root'
  20. mode: '0644'
  21. - name: Configure radvd interfaces
  22. template:
  23. src: 'etc/radvd.conf.d/interface.j2'
  24. dest: '/etc/radvd.conf.d/interface_{{ item.interface }}'
  25. owner: 'root'
  26. group: 'root'
  27. mode: '0644'
  28. with_items: radvd_interfaces
  29. - name: Assemble /etc/radvd.conf
  30. assemble:
  31. src: '/etc/radvd.conf.d'
  32. dest: '/etc/radvd.conf'
  33. owner: 'root'
  34. group: 'root'
  35. mode: '0644'
  36. notify: [ 'Test radvd and restart' ]