mirror of
https://github.com/iiab/iiab.git
synced 2025-02-13 03:32:12 +00:00
cleaner Ansible output
This commit is contained in:
parent
9fdcd5cbaa
commit
28ee464753
1 changed files with 4 additions and 4 deletions
|
@ -42,13 +42,13 @@
|
|||
ignore_errors: True
|
||||
changed_when: False
|
||||
|
||||
- name: Set has ifcfg gw based on on macaddress if found
|
||||
- name: Set has ifcfg gw based on macaddress if found
|
||||
set_fact:
|
||||
has_ifcfg_gw: "{{ ifcfg_gw_mac.stdout|trim }}"
|
||||
when: ifcfg_gw_mac is defined and ifcfg_gw_mac.changed and ifcfg_gw_mac.stdout != ""
|
||||
|
||||
# could use something else - Can Fail
|
||||
- name: Find wifi gateway config if present - Can Fail
|
||||
- name: Find WiFi gateway config if present - Can Fail
|
||||
shell: egrep -rn ESSID /etc/sysconfig/network-scripts/ifcfg* | gawk -F ':' '{print $1}' | gawk -F '/' '{print $5}'
|
||||
register: ifcfg_WAN_wifi
|
||||
ignore_errors: True
|
||||
|
@ -61,13 +61,13 @@
|
|||
with_items:
|
||||
- "{{ ifcfg_WAN_wifi.stdout_lines }}"
|
||||
|
||||
- name: Finding device for wifi AP gateway - Can Fail
|
||||
- name: Finding device for WiFi AP gateway - Can Fail
|
||||
shell: egrep -rn DEVICE /etc/sysconfig/network-scripts/{{ has_wifi_gw }} | gawk -F '=' '{print $2}'
|
||||
when: has_wifi_gw != "none" and has_ifcfg_gw != "none"
|
||||
register: AP_device
|
||||
ignore_errors: True
|
||||
|
||||
- name: Setting wifi device
|
||||
- name: Setting WiFi device
|
||||
set_fact:
|
||||
ap_device: "{{ AP_device.stdout }}"
|
||||
when: AP_device.stdout is defined and AP_device.stdout != ""
|
||||
|
|
Loading…
Reference in a new issue