mirror of
https://github.com/iiab/iiab.git
synced 2025-02-13 11:42:08 +00:00
move dhcpcd detection to local_facts to clean up logging
This commit is contained in:
parent
f04c8894cc
commit
95409fdfff
2 changed files with 4 additions and 8 deletions
|
@ -19,14 +19,9 @@
|
||||||
include_tasks: detected_redhat.yml
|
include_tasks: detected_redhat.yml
|
||||||
when: is_redhat
|
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
|
- name: Setting dhcpcd_test results
|
||||||
set_fact:
|
set_fact:
|
||||||
dhcpcd_result: "{{ dhcpcd_test.stdout }}"
|
dhcpcd_result: '{{ ansible_local.local_facts.dhcpcd }}'
|
||||||
|
|
||||||
- name: Check /etc/network/interfaces for gateway
|
- name: Check /etc/network/interfaces for gateway
|
||||||
shell: grep {{ device_gw }} /etc/network/interfaces | wc -l
|
shell: grep {{ device_gw }} /etc/network/interfaces | wc -l
|
||||||
|
|
|
@ -5,6 +5,7 @@ VERSION_ID=`grep VERSION_ID /etc/*elease | cut -d= -f2`
|
||||||
VERSION_ID=${VERSION_ID//\"/}
|
VERSION_ID=${VERSION_ID//\"/}
|
||||||
VERSION_ID=${VERSION_ID%%.*}
|
VERSION_ID=${VERSION_ID%%.*}
|
||||||
OS_VER=$OS-$VERSION_ID
|
OS_VER=$OS-$VERSION_ID
|
||||||
|
DHCPCD=`which dhcpcd`
|
||||||
|
|
||||||
case $OS_VER in
|
case $OS_VER in
|
||||||
"fedora-18" | \
|
"fedora-18" | \
|
||||||
|
@ -46,7 +47,6 @@ fi
|
||||||
# interruptions return last stage number recorded (1-9)
|
# interruptions return last stage number recorded (1-9)
|
||||||
if [ -f /etc/iiab/iiab.env ]
|
if [ -f /etc/iiab/iiab.env ]
|
||||||
then
|
then
|
||||||
STAGE=1
|
|
||||||
source /etc/iiab/iiab.env
|
source /etc/iiab/iiab.env
|
||||||
STAGE=$STAGE
|
STAGE=$STAGE
|
||||||
else
|
else
|
||||||
|
@ -56,6 +56,7 @@ ANSIBLE_VERSION=$(ansible --version|head -n 1|cut -f 2 -d " ")
|
||||||
cat <<EOF
|
cat <<EOF
|
||||||
{"phplib_dir" : "$PHPLIB_DIR",
|
{"phplib_dir" : "$PHPLIB_DIR",
|
||||||
"stage" : "$STAGE",
|
"stage" : "$STAGE",
|
||||||
|
"dhcpcd" : "$DHCPCD",
|
||||||
"iiab_branch" : "$BRANCH",
|
"iiab_branch" : "$BRANCH",
|
||||||
"iiab_commit" : "$COMMIT",
|
"iiab_commit" : "$COMMIT",
|
||||||
"xo_model" : "$XO_VERSION",
|
"xo_model" : "$XO_VERSION",
|
||||||
|
|
Loading…
Reference in a new issue