From 2e384e68fb867d8ba7178c4398e35653ab567538 Mon Sep 17 00:00:00 2001 From: Micah Date: Tue, 12 Jul 2016 16:45:30 -0400 Subject: git subrepo clone https://leap.se/git/puppet_apt puppet/modules/apt subrepo: subdir: "puppet/modules/apt" merged: "33c61e8" upstream: origin: "https://leap.se/git/puppet_apt" branch: "master" commit: "33c61e8" git-subrepo: version: "0.3.0" origin: "https://github.com/ingydotnet/git-subrepo" commit: "1e79595" Change-Id: I6515ec49bbacdffd9f3729d486d2868162f9ac78 --- puppet/modules/apt/lib/facter/apt_running.rb | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 puppet/modules/apt/lib/facter/apt_running.rb (limited to 'puppet/modules/apt/lib/facter/apt_running.rb') diff --git a/puppet/modules/apt/lib/facter/apt_running.rb b/puppet/modules/apt/lib/facter/apt_running.rb new file mode 100644 index 00000000..e8f2156e --- /dev/null +++ b/puppet/modules/apt/lib/facter/apt_running.rb @@ -0,0 +1,7 @@ +Facter.add("apt_running") do + setcode do + #Facter::Util::Resolution.exec('/usr/bin/dpkg -s mysql-server >/dev/null 2>&1 && echo true || echo false') + Facter::Util::Resolution.exec('pgrep apt-get >/dev/null 2>&1 && echo true || echo false') + end +end + -- cgit v1.2.3