Sha256: ff7fb00036ef5384dc1dfad72281bb8e99c5301be867d169544b5a8bd58cd4dc
Contents?: true
Size: 1.1 KB
Versions: 4
Compression:
Stored size: 1.1 KB
Contents
module Vagrant module Util # Helper methods for inspecting guests to determine if specific services # or applications are installed and in use module GuestInspection # Linux specific inspection helpers module Linux ## systemd helpers # systemd is in use # # @return [Boolean] def systemd?(comm) comm.test("systemctl | grep '^-\.mount'") end # systemd hostname set is via hostnamectl # # @return [Boolean] def hostnamectl?(comm) comm.test("hostnamectl") end ## nmcli helpers # nmcli is installed # # @return [Boolean] def nmcli?(comm) comm.test("nmcli") end # NetworkManager currently controls device # # @param comm [Communicator] # @param device_name [String] # @return [Boolean] def nm_controlled?(comm, device_name) comm.test("nmcli d show #{device_name}") && !comm.test("nmcli d show #{device_name} | grep unmanaged") end end end end end
Version data entries
4 entries across 4 versions & 2 rubygems