You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

52 lines
1.4 KiB

  1. ---
  2. - name: Configure dnsmasq
  3. collections: [ 'debops.debops', 'debops.roles01',
  4. 'debops.roles02', 'debops.roles03' ]
  5. hosts: [ 'debian10' ]
  6. become: True
  7. environment: '{{ inventory__environment | d({})
  8. | combine(inventory__group_environment | d({}))
  9. | combine(inventory__host_environment | d({})) }}'
  10. vars:
  11. dnsmasq__dhcpv4: True
  12. dnsmasq__dhcpv6: False
  13. dnsmasq__interfaces:
  14. - name: 'eth1'
  15. # addresses: ['172.16.30.100']
  16. domain: local
  17. dhcp_range_start: 180
  18. dhcp_range_end: -6
  19. dnsmasq__base_domain: 'local'
  20. # dnsmasq__configuration:
  21. # - name: 'dhcp-option.conf'
  22. # options:
  23. # - name: 'dhcp-option-1'
  24. # option: 'dhcp-option'
  25. # value: '1,255.255.255.0'
  26. # - name: 'dhcp-option-3'
  27. # option: 'dhcp-option'
  28. # value: '3,172.16.30.100'
  29. # - name: 'dhcp-option-6'
  30. # option: 'dhcp-option'
  31. # value: '6,172.16.30.100'
  32. pre_tasks:
  33. - name: Prepare dnsmasq environment
  34. import_role:
  35. name: 'dnsmasq'
  36. tasks_from: 'main_env'
  37. tags: [ 'role::dnsmasq', 'role::ferm', 'role::tcpwrappers' ]
  38. roles:
  39. - role: resolvconf
  40. tags: [ 'role::resolvconf', 'skip::resolvconf' ]
  41. resolvconf__dependent_services:
  42. - 'dnsmasq'
  43. - role: dnsmasq
  44. tags: [ 'role::dnsmasq', 'skip::dnsmasq' ]