Mercurial > repos > other > Puppet
view modules/firewall/lib/facter/ip6tables_version.rb @ 478:adf6fe9bbc17
Update Puppet modules to latest versions
author | IBBoard <dev@ibboard.co.uk> |
---|---|
date | Thu, 29 Aug 2024 18:47:29 +0100 |
parents | 66c406eec60d |
children |
line wrap: on
line source
# frozen_string_literal: true Facter.add(:ip6tables_version) do confine kernel: :Linux confine { Facter::Core::Execution.which('ip6tables') } setcode do version = Facter::Core::Execution.execute('ip6tables --version', { on_fail: nil }) version.match(%r{\d+\.\d+\.\d+}).to_s if version end end