ansible/roles/network/defaults/main.yml

47 lines
1.4 KiB
YAML
Raw Normal View History

2019-03-27 07:05:37 +00:00
---
2022-08-31 17:39:41 +00:00
# network_netplan_version: 2
# network_netplan_renderer: networkd
network_netplan_etc_path: /etc/netplan
network_netplan_config_path: "{{ network_netplan_etc_path }}/ansible.yaml"
network_netplan_default_config_path: "{{ network_netplan_etc_path }}/01-netcfg.yaml"
# network_netplan_default_config_state: absent
2024-04-14 22:23:27 +00:00
network_netplan:
network:
version: 2
ethernets:
eth0:
dhcp4: false
dhcp6: false
accept-ra: true
addresses:
- "{{ ansible_default_ipv4.address }}/{{ (ansible_default_ipv4.network + '/' + ansible_default_ipv4.netmask) | ansible.utils.ipaddr('prefix') }}"
- "{{ ansible_default_ipv6.address }}/{{ ansible_default_ipv6.prefix }}"
routes:
- to: default
via: "{{ ansible_default_ipv4.gateway }}"
nameservers:
addresses: "{{ network_dns_nameservers }}"
2022-08-31 17:39:41 +00:00
network_interfaces:
- name: eth0
inet4:
dhcp: false
address:
- "{{ ansible_default_ipv4.address }}/{{ (ansible_default_ipv4.network + '/' + ansible_default_ipv4.netmask) | ansible.utils.ipaddr('prefix') }}"
gateway: "{{ ansible_default_ipv4.gateway }}"
inet6:
dhcp: false
2024-04-14 22:23:27 +00:00
accept_ra: true
2022-08-31 17:39:41 +00:00
address:
- "{{ ansible_default_ipv6.address }}/{{ ansible_default_ipv6.prefix }}"
gateway: "{{ ansible_default_ipv6.gateway }}"
network_dns_nameservers:
- 8.8.8.8
- 1.1.1.1
- 9.9.9.9
- 8.8.4.4
- 1.0.0.1
- 149.112.112.112