Skip to content
Snippets Groups Projects
Commit f63685f1 authored by Jörg Sachse's avatar Jörg Sachse
Browse files

set default for CIDR netmask to make CI tests pass when...

set default for CIDR netmask to make CI tests pass when ansible_facts.default_ipv4.prefix is not available
parent 76d76d98
No related branches found
No related tags found
1 merge request!2Resolve "ansible_facts.default_ipv4.prefix not available in CI"
Pipeline #3345 passed
This commit is part of merge request !2. Comments created here will be created in the context of that merge request.
...@@ -30,9 +30,6 @@ ...@@ -30,9 +30,6 @@
# to avoid any interference and hand over management for that interface to # to avoid any interference and hand over management for that interface to
# `systemd-networkd`. Now, '/etc/network/interfaces' will only contain the # `systemd-networkd`. Now, '/etc/network/interfaces' will only contain the
# config for the loopback interface. # config for the loopback interface.
- name: IP
ansible.builtin.debug:
msg: "{{ ansible_facts.default_ipv4 }}"
- name: deploy network interface config - name: deploy network interface config
ansible.builtin.template: ansible.builtin.template:
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
Name={{ ansible_facts.default_ipv4.interface }} Name={{ ansible_facts.default_ipv4.interface }}
[Network] [Network]
Address={{ ansible_facts.default_ipv4.address }}/{{ ansible_facts.default_ipv4.prefix }} Address={{ ansible_facts.default_ipv4.address }}/{{ ansible_facts.default_ipv4.prefix | default("24") }}
Gateway={{ ansible_facts.default_ipv4.gateway }} Gateway={{ ansible_facts.default_ipv4.gateway }}
DNS=194.95.142.200 DNS=194.95.142.200
DNS=194.95.142.203 DNS=194.95.142.203
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment