cruelsmith
01/13/2023, 4:04 PMscan() function and wrote now my own puppet function in ruby:
# Matches a pattern against a string and returns an array containing
# every match.
# If the pattern contains no groups, each individual result consists of the
# matched string. If the pattern contains groups, each individual result is
# itself an array containing one entry per group.
#
# @see <https://apidock.com/ruby/String/scan>
#
Puppet::Functions.create_function(:scan) do
dispatch :scan do
param 'String', :string
param 'Variant[String,Regexp]', :Pattern
return_type 'Array'
end
def scan(string, pattern)
string.scan(pattern)
end
end
Place this under lib/puppet/functions/scan.rb so you can use it.vchepkov
01/13/2023, 4:08 PMramindk
01/13/2023, 4:14 PMcruelsmith
01/13/2023, 4:28 PMscan() function and wrote now my own puppet function in ruby to solve this one:
# Matches a pattern against a string and returns an array containing
# every match.
# If the pattern contains no groups, each individual result consists of the
# matched string. If the pattern contains groups, each individual result is
# itself an array containing one entry per group.
#
# @see <https://apidock.com/ruby/String/scan>
#
Puppet::Functions.create_function(:scan) do
dispatch :scan do
param 'String', :string
param 'Variant[String,Regexp]', :Pattern
return_type 'Array'
end
def scan(string, pattern)
string.scan(pattern)
end
end
Place this under lib/puppet/functions/scan.rb so you can use it.Michael Phillips
01/13/2023, 5:03 PMMichael Phillips
01/13/2023, 5:03 PMCVQuesty
01/13/2023, 5:08 PMCVQuesty
01/13/2023, 5:10 PMCVQuesty
01/13/2023, 5:10 PMYorokobi
01/13/2023, 5:11 PMCVQuesty
01/13/2023, 5:11 PMYorokobi
01/13/2023, 5:11 PMCVQuesty
01/13/2023, 5:11 PMYorokobi
01/13/2023, 5:12 PMMichael Phillips
01/13/2023, 5:18 PMThis method of agent installation is not supported for ubuntu-22.04-amd64 in Puppet Enterprise v2019.8.7Slackbot
01/13/2023, 5:21 PMvchepkov
01/13/2023, 5:25 PMvchepkov
01/13/2023, 5:25 PMCVQuesty
01/13/2023, 5:26 PMCVQuesty
01/13/2023, 5:26 PMCVQuesty
01/13/2023, 5:26 PMCVQuesty
01/13/2023, 5:27 PMvchepkov
01/13/2023, 5:27 PM[root@puppet ~]# locate pe_repo|grep ubuntu_2204
/opt/puppetlabs/puppet/modules/pe_repo/manifests/platform/ubuntu_2204_amd64.ppvchepkov
01/13/2023, 5:27 PMpe-modules-2021.7.1.0-1.el8.x86_64Slackbot
01/13/2023, 5:31 PMMichael Phillips
01/13/2023, 5:31 PMCVQuesty
01/13/2023, 5:34 PMCVQuesty
01/13/2023, 5:34 PMAlonso Muñoz
01/13/2023, 6:10 PMAlonso Muñoz
01/13/2023, 6:11 PM