# SPDX-License-Identifier: BSD-3-Clause
---
- name: Manage DNS settings
  hosts: all
  vars:
    network_connections:
      - name: eth0
        type: ethernet
        ip:
          route_metric4: 100
          dhcp4: false
          gateway4: 192.0.2.1
          dns_priority: 9999
          dns:
            - 192.0.2.2
            - 198.51.100.5
          dns_search:
            - example.com
            - subdomain.example.com
          dns_options:
            - rotate
            - timeout:1

          route_metric6: -1
          auto6: false
          gateway6: 2001:db8::1

          address:
            - 192.0.2.3/24
            - 198.51.100.3/26
            - 2001:db8::80/7

          route:
            - network: 198.51.100.128
              prefix: 26
              gateway: 198.51.100.1
              metric: 2
            - network: 198.51.100.64
              prefix: 26
              gateway: 198.51.100.6
              metric: 4
          route_append_only: false
          rule_append_only: true
  roles:
    - linux-system-roles.network
