mirror of
https://github.com/iiab/iiab.git
synced 2025-03-09 15:40:17 +00:00
better feedback
This commit is contained in:
parent
57ba762345
commit
0ca3bac427
1 changed files with 4 additions and 4 deletions
|
@ -69,10 +69,9 @@
|
|||
|
||||
# Discover: do we have a gateway?
|
||||
# If Ansible detects gateway, becomes WAN candidate.
|
||||
- name: "Do we have a gateway? If so set discovered_wan_iface: {{ ansible_default_ipv4.alias }}, iiab_wan_iface: {{ discovered_wan_iface }}"
|
||||
- name: "Do we have a gateway? If so set discovered_wan_iface: {{ ansible_default_ipv4.alias }}"
|
||||
set_fact:
|
||||
discovered_wan_iface: "{{ ansible_default_ipv4.alias }}"
|
||||
iiab_wan_iface: "{{ discovered_wan_iface }}"
|
||||
when: ansible_default_ipv4.gateway is defined
|
||||
|
||||
- name: "Verify gateway active: ping -c4 {{ ansible_default_ipv4.gateway }}"
|
||||
|
@ -80,12 +79,13 @@
|
|||
when: discovered_wan_iface != "none"
|
||||
register: gw_active_test
|
||||
|
||||
- name: If so, set gw_active
|
||||
- name: If so, set gw_active, iiab_wan_iface to {{ discovered_wan_iface }}
|
||||
set_fact:
|
||||
iiab_wan_iface: "{{ discovered_wan_iface }}"
|
||||
gw_active: True
|
||||
when: discovered_wan_iface != "none" and gw_active_test.stdout == "1"
|
||||
|
||||
- name: Test for Internet access ({{ iiab_download_url }}/heart-beat.txt)
|
||||
- name: Test with {{ iiab_wan_iface }} for Internet access ({{ iiab_download_url }}/heart-beat.txt)
|
||||
get_url:
|
||||
url: "{{ iiab_download_url }}/heart-beat.txt"
|
||||
dest: /tmp/heart-beat.txt
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue