( igor | 2024. 01. 31., sze – 14:55 )

requirements.yml

---
- src: mrlesmithjr.dnsmasq

dnsmasq.yml

---
- hosts: all
  become: yes
  gather_facts: yes

  roles:
    - role: mrlesmithjr.dnsmasq
      dnsmasq_config: true
      dnsmasq_enable_dhcp: true
      dnsmasq_pri_domain_name:
      dnsmasq_dhcp_boot: ""
      dnsmasq_nameservers:
        - 1.1.1.1
        - 8.8.8.8
      dnsmasq_dhcp_options:
        - option: dns-server
          value:
            - 1.1.1.1
            - 8.8.8.8
        - option: ntp-server
          value:
            - 192.168.9.x
            - 192.168.9.x
        - option: router
          value:
            - 192.168.9.x
      dnsmasq_dhcp_scopes:
        - start:                         192.168.9.x
          end:                           192.168.9.x
          netmask:                       255.255.255.0
          lease_time:                    24h
      dnsmasq_dhcp_host_reservations:
        - address:                       192.168.9.x
          lease_time:                    24h
          mac_address:
            - "11:22:33:44:55:66"
          name:                          dummy

ansible-galaxy install -r requirements.yml

ansible-playbook -i "192.168.8.130," dnsmasq.yml