itamae/cookbooks/base/attributes.rb

16 lines
237 B
Ruby

# Check whether it is inside the LXC container:
result = run_command('grep lxc /proc/1/environ', error: false).exit_status
if result == 0
lxc = true
else
lxc = false
end
node.reverse_merge!({
'base' => {
'lxc' => lxc
}
})