-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
10 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }}" |