1
0
Fork 0
mirror of https://github.com/iiab/iiab.git synced 2025-02-13 03:32:12 +00:00

move dhcpcd detection to local_facts to clean up logging

This commit is contained in:
Jerry Vonau 2017-11-10 13:01:22 -06:00
parent f04c8894cc
commit 95409fdfff
2 changed files with 4 additions and 8 deletions

View file

@ -19,14 +19,9 @@
include_tasks: detected_redhat.yml
when: is_redhat
- name: Check to see if dhcpcd is installed and active - Can Fail
shell: systemctl is-enabled dhcpcd
register: dhcpcd_test
ignore_errors: True
- name: Setting dhcpcd_test results
set_fact:
dhcpcd_result: "{{ dhcpcd_test.stdout }}"
dhcpcd_result: '{{ ansible_local.local_facts.dhcpcd }}'
- name: Check /etc/network/interfaces for gateway
shell: grep {{ device_gw }} /etc/network/interfaces | wc -l

View file

@ -5,6 +5,7 @@ VERSION_ID=`grep VERSION_ID /etc/*elease | cut -d= -f2`
VERSION_ID=${VERSION_ID//\"/}
VERSION_ID=${VERSION_ID%%.*}
OS_VER=$OS-$VERSION_ID
DHCPCD=`which dhcpcd`
case $OS_VER in
"fedora-18" | \
@ -46,7 +47,6 @@ fi
# interruptions return last stage number recorded (1-9)
if [ -f /etc/iiab/iiab.env ]
then
STAGE=1
source /etc/iiab/iiab.env
STAGE=$STAGE
else
@ -56,10 +56,11 @@ ANSIBLE_VERSION=$(ansible --version|head -n 1|cut -f 2 -d " ")
cat <<EOF
{"phplib_dir" : "$PHPLIB_DIR",
"stage" : "$STAGE",
"dhcpcd" : "$DHCPCD",
"iiab_branch" : "$BRANCH",
"iiab_commit" : "$COMMIT",
"xo_model" : "$XO_VERSION",
"ansible_version" : "$ANSIBLE_VERSION",
"ansible_version" : "$ANSIBLE_VERSION",
"os" : "$OS",
"os_ver" : "$OS_VER"}