https://www.puppet.com/community logo
Join Slack
Powered by
# puppet
  • c

    cruelsmith

    01/13/2023, 4:04 PM
    Found the ruby
    scan()
    function and wrote now my own puppet function in ruby:
    Copy code
    # 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.
  • v

    vchepkov

    01/13/2023, 4:08 PM
    pdk forcing complex and useless hiera configuration for new projects annoys me to no end
  • r

    ramindk

    01/13/2023, 4:14 PM
    In regards to supporting multiple OS there is almost no value unless you're publishing your module or actually supporting those OS internally. It's just extra work without enough context. Doing lookups based on Oracle rather than RedHat is probably fine. Same issues between Ubuntu/Debian. Might be less flexible in the future, but it's less likely to cause operational problems now.
  • c

    cruelsmith

    01/13/2023, 4:28 PM
    Found the ruby
    scan()
    function and wrote now my own puppet function in ruby to solve this one:
    Copy code
    # 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.
  • m

    Michael Phillips

    01/13/2023, 5:03 PM
    Hello good morning community, do you know if there is a specific documentation for install puppet agent in Ubuntu 22.04
  • m

    Michael Phillips

    01/13/2023, 5:03 PM
    thanks in advance
  • c

    CVQuesty

    01/13/2023, 5:08 PM
    I don’t think that’s available yet
  • c

    CVQuesty

    01/13/2023, 5:10 PM
    https://www.puppet.com/docs/pe/2021.7/supported_operating_systems.html#supported_operating_systems_and_devices-supported-primary-server-platforms ….. Wait, yes it is
  • c

    CVQuesty

    01/13/2023, 5:10 PM
    I was looking at server
  • y

    Yorokobi

    01/13/2023, 5:11 PM
    The Puppet docs are pretty clear on how to install the agent. Start with https://www.puppet.com/docs/puppet/7/install_puppet.html#enable_the_puppet_platform_repository to get the repo, then for install procedure: https://www.puppet.com/docs/puppet/7/install_agents.html#install_nix_agents (hint: just like any other Ubuntu/Debian package)
  • c

    CVQuesty

    01/13/2023, 5:11 PM
    https://www.puppet.com/docs/pe/2021.7/installing_nix_agents.html#install_nix_agents_pe_package_management
  • y

    Yorokobi

    01/13/2023, 5:11 PM
    The Puppet docs are pretty clear on how to install the agent. Start with https://www.puppet.com/docs/puppet/7/install_puppet.html#enable_the_puppet_platform_repository to get the repo, then for install procedure: https://www.puppet.com/docs/puppet/7/install_agents.html#install_nix_agents (hint: just like any other Ubuntu/Debian package)
  • c

    CVQuesty

    01/13/2023, 5:11 PM
    PE is a little different
  • y

    Yorokobi

    01/13/2023, 5:12 PM
    PE wasn't specified but yes, it is different.
  • m

    Michael Phillips

    01/13/2023, 5:18 PM
    Thanks is PE but I think the problem is my version:
    Copy code
    This method of agent installation is not supported for ubuntu-22.04-amd64 in Puppet Enterprise v2019.8.7
  • s

    Slackbot

    01/13/2023, 5:21 PM
    This message was deleted.
    m
    • 2
    • 1
  • v

    vchepkov

    01/13/2023, 5:25 PM
    imho, it was added in PE2021.7.0
  • v

    vchepkov

    01/13/2023, 5:25 PM
    time to upgrade
  • c

    CVQuesty

    01/13/2023, 5:26 PM
    just looked up your docs. Your agent is only supported up to 20.04 for amd64
  • c

    CVQuesty

    01/13/2023, 5:26 PM
    https://github.com/puppetlabs/docs-archive/blob/main/pe/2019.8/PE%202019.8.7.pdf
  • c

    CVQuesty

    01/13/2023, 5:26 PM
    Page 161
  • c

    CVQuesty

    01/13/2023, 5:27 PM
    Page 161
  • v

    vchepkov

    01/13/2023, 5:27 PM
    Copy code
    [root@puppet ~]# locate pe_repo|grep ubuntu_2204
    /opt/puppetlabs/puppet/modules/pe_repo/manifests/platform/ubuntu_2204_amd64.pp
  • v

    vchepkov

    01/13/2023, 5:27 PM
    Copy code
    pe-modules-2021.7.1.0-1.el8.x86_64
  • s

    Slackbot

    01/13/2023, 5:31 PM
    This message was deleted.
    🎂 1
    ❤️ 1
    l
    • 2
    • 1
  • m

    Michael Phillips

    01/13/2023, 5:31 PM
    is not supported
  • c

    CVQuesty

    01/13/2023, 5:34 PM
    right
  • c

    CVQuesty

    01/13/2023, 5:34 PM
    but the original question was for docs. That’s the full doc link for your version of PE
  • a

    Alonso Muñoz

    01/13/2023, 6:10 PM
    Hi everyone, how can I generate Puppet Server certificates in Puppet 5? since the puppetserver ca command says it doesn't exist
  • a

    Alonso Muñoz

    01/13/2023, 6:11 PM
    Hi everyone, how can I generate Puppet Server certificates in Puppet 5? since the puppetserver ca command says it doesn't exist
1...272273274...428Latest