aboutsummaryrefslogtreecommitdiff
path: root/plugins/facter/xen.rb
blob: 0ea8fa2c575e86b79888f92af8dd43b41cd03a4b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
# xen.rb -- linux-vserver.org related facts
# Copyright (C) 2008 Puzzle ITC
# See LICENSE for the full license granted to you.

Facter.add("xen_domains") do
	confine :virtual => :xen0
	ENV["PATH"]="/bin:/sbin:/usr/bin:/usr/sbin"
	setcode do
        %x{xm list | egrep -v '(^Name|^Domain-0)' | wc -l}.chomp
	end
end