1
0
Fork 0
mirror of https://github.com/iiab/iiab.git synced 2025-02-13 11:42:08 +00:00

cleaner Ansible output

This commit is contained in:
A Holt 2017-10-27 13:26:27 -04:00 committed by GitHub
parent 9fdcd5cbaa
commit 28ee464753
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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 != ""