From 5f383b546c57c8cdebcd697dfe287c4bdc851207 Mon Sep 17 00:00:00 2001 From: Seth Vargo Date: Fri, 10 Jul 2015 13:25:11 -0600 Subject: [PATCH] Use sudo for read_ip_address capability Fixes #4868 --- plugins/guests/linux/cap/read_ip_address.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/guests/linux/cap/read_ip_address.rb b/plugins/guests/linux/cap/read_ip_address.rb index eca1aec54..5fa9fea15 100644 --- a/plugins/guests/linux/cap/read_ip_address.rb +++ b/plugins/guests/linux/cap/read_ip_address.rb @@ -5,7 +5,7 @@ module VagrantPlugins def self.read_ip_address(machine) command = "LANG=en ifconfig | grep 'inet addr:'| grep -v '127.0.0.1' | cut -d: -f2 | awk '{ print $1 }'" result = "" - machine.communicate.execute(command) do |type, data| + machine.communicate.sudo(command) do |type, data| result << data if type == :stdout end