Sha256: c77a952d4c91dad13b6a0f058d21dd1d24093e955722598c64ca94d9e04525b4

Contents?: true

Size: 330 Bytes

Versions: 2

Compression:

Stored size: 330 Bytes

Contents

Facter.add(:id) do
    confine :operatingsystem => %w{Linux Fedora RedHat CentOS SuSE SLES Debian Ubuntu Gentoo AIX}
    setcode "whoami"
end

Facter.add(:id) do
    confine :operatingsystem => %w{Solaris}
    setcode do
        if %x{id} =~ /^uid=\d+\((\S+)\)/
            $1
        else
            nil
        end
    end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
facter-1.5.3 lib/facter/id.rb
facter-1.5.4 lib/facter/id.rb