Skip to content

Commit

Permalink
split DNS/DHCP check and message
Browse files Browse the repository at this point in the history
  • Loading branch information
evgeni committed Mar 7, 2024
1 parent a3d32b3 commit f74d41a
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions roles/satellite-clone/tasks/interface_check.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,18 @@
---
- name: Fail if interfaces on machine do not match backup metadata interfaces
- name: Fail if interfaces on machine do not match backup metadata DNS interfaces
fail:
msg: "The network interface {{ proxy_config.dns_interface }} setup for DNS and {{ proxy_config.dhcp_interface }} setup for DHCP do not match the network interfaces on the current machine"
msg: "The network interface {{ proxy_config.dns_interface }} setup for DNS do not match the network interfaces on the current machine"
when:
- proxy_config.dns
- proxy_config.dhcp
- proxy_config.dns_interface not in network_interfaces
vars:
network_interfaces: "{{ ansible_interfaces | reject('match', 'lo') | list }}"

- name: Fail if interfaces on machine do not match backup metadata DHCP interfaces
fail:
msg: "The network interface {{ proxy_config.dhcp_interface }} setup for DHCP do not match the network interfaces on the current machine"
when:
- proxy_config.dhcp
- proxy_config.dhcp_interface not in network_interfaces
vars:
network_interfaces: "{{ ansible_interfaces | reject('match', 'lo') | list }}"

0 comments on commit f74d41a

Please sign in to comment.