From 787bb61add2214cdfd154148d175436ac4f96f92 Mon Sep 17 00:00:00 2001 From: Ryan Cavicchioni Date: Sun, 31 Mar 2019 13:22:09 +0000 Subject: [PATCH] Add default network configuration --- roles/network/defaults/main.yml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/roles/network/defaults/main.yml b/roles/network/defaults/main.yml index d0cfec9..4c3167d 100644 --- a/roles/network/defaults/main.yml +++ b/roles/network/defaults/main.yml @@ -1,5 +1,13 @@ --- -network_interfaces: [] +network_interfaces: + - name: "{{ facter_networking.primary }}" + address: + - "{{ ansible_default_ipv4.address }}/{{ (ansible_default_ipv4.address + '/' + ansible_default_ipv4.netmask) | ipaddr('prefix') }}" + - "{{ ansible_default_ipv6.address + '/' + ansible_default_ipv6.prefix }}" + gateway: + - "{{ ansible_default_ipv4.gateway }}" + - "{{ ansible_default_ipv6.gateway }}" + network_nameservers: [] network_resolv_conf_options: