Merge branch 'consul-docker-support' of kazu634/itamae into master

This commit is contained in:
Kazuhiro MUSASHI 2019-08-10 20:01:15 +09:00 committed by Gitea
commit e218ee2bff
1 changed files with 2 additions and 2 deletions

View File

@ -3,9 +3,9 @@
# ------------------------------------------- # -------------------------------------------
case run_command('grep VERSION_ID /etc/os-release | awk -F\" \'{print $2}\'').stdout.chomp case run_command('grep VERSION_ID /etc/os-release | awk -F\" \'{print $2}\'').stdout.chomp
when "18.04" when "18.04"
cmd = 'LANG=C /sbin/ifconfig | grep "inet " | grep -v 127.0.0.1 | cut -d" " -f10' cmd = 'LANG=C /sbin/ifconfig | grep "inet " | grep 192.168 | cut -d" " -f10'
else else
cmd = 'LANG=C /sbin/ifconfig | grep "inet addr" | grep -v 127.0.0.1 | awk "{print $2;}" | cut -d: -f2 | cut -f 1 -d " " | tail -1' cmd = 'LANG=C /sbin/ifconfig | grep "inet addr" | grep 192.168 | awk "{print $2;}" | cut -d: -f2 | cut -f 1 -d " " | tail -1'
end end
ipaddr = run_command(cmd).stdout.chomp ipaddr = run_command(cmd).stdout.chomp