We have Ubuntu 16.04. I tried chef client 13.6.4 and 14.1.1 versions and got same error
Compiled Resource:
ifconfig("10.223.0.1") do
action [:add, :enable]
default_guard_interpreter :default
declared_type :ifconfig
cookbook_name "nas"
recipe_name "test"
device "tun2"
mask "255.255.0.0"
onboot "yes"
target "10.223.0.1"
end
STDERR: SIOCSIFADDR: No such device
tun2: ERROR while getting interface flags: No such device
SIOCSIFNETMASK: No such device
---- End output of ["ifconfig", "tun2", "10.223.0.1", "netmask", "255.255.0.0"] ----
Ran ["ifconfig", "tun2", "10.223.0.1", "netmask", "255.255.0.0"] returned 255
UPDATE
Interface creation with ip tuntap add name tun2 mode tun
fixed the issue. Is it possible to include this step in resource? Have I missed some key to do it?