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

    NickB

    08/17/2022, 4:36 AM
    Looks like
    ensure_resource('class', 'profile::some_user', { my_variable => $user })
    would probably work in your main class
  • d

    dimitry

    08/17/2022, 5:03 AM
    ohhhh interesting
  • d

    dimitry

    08/17/2022, 5:04 AM
    nice thanks
  • y

    Yury Bushmelev

    08/17/2022, 8:26 AM
    ensure_resource() is mostly bad style these days I'd say..
    đź’Ż 1
  • t

    tutelacool

    08/17/2022, 10:53 AM
    okay I know that I can use
    $facts['os']['distro']['codename']
    instead of
    lsbdistcodename
    But when I try from Inst.2 and I compare with Inst.1 I do not see the same diff. I would like to understand. I tried to purge and reinstall puppet-agent package on Inst.2 . no effect. someone have any idea? there a diff one is much updated then the other one. but doesn’t explain this? I tried to differentiate the Ruby version. but they use the same version. Inst.1 :
    Copy code
    # facter lsbdistcodename
    xenial
    # dpkg -l puppet-agent
    ii  puppet-agent                                                 6.24.0-1xenial                      amd64                               The Puppet Agent package contains all of the elements needed to run puppet, including ruby, facter, and hiera.
    # cat /etc/issue
    Ubuntu 16.04.7 LTS \n \l
    Inst.2 :
    Copy code
    # facter lsbdistcodename
    #
    # dpkg -l puppet-agent
    ii  puppet-agent                                                 6.24.0-1xenial                      amd64                               The Puppet Agent package contains all of the elements needed to run puppet, including ruby, facter, and hiera
    # cat /etc/issue
    Ubuntu 16.04.5 LTS \n \l
  • t

    tutelacool

    08/17/2022, 10:54 AM
    okay I know that I can use
    $facts['os']['distro']['codename']
    instead of
    lsbdistcodename
    But when I try from Inst.2 and I compare with Inst.1 I do not see the same diff. I would like to understand. I tried to purge and reinstall puppet-agent package on Inst.2 . no effect. someone have any idea? Inst.1 :
    Copy code
    # facter lsbdistcodename
    xenial
    # dpkg -l puppet-agent
    ii  puppet-agent                                                 6.24.0-1xenial                      amd64                               The Puppet Agent package contains all of the elements needed to run puppet, including ruby, facter, and hiera.
    # cat /etc/issue
    Ubuntu 16.04.7 LTS \n \l
    Inst.2 :
    Copy code
    # facter lsbdistcodename
    #
    # dpkg -l puppet-agent
    ii  puppet-agent                                                 6.24.0-1xenial                      amd64                               The Puppet Agent package contains all of the elements needed to run puppet, including ruby, facter, and hiera
    # cat /etc/issue
    Ubuntu 16.04.5 LTS \n \l
  • t

    tutelacool

    08/17/2022, 10:55 AM
    okay I know that I can use
    $facts['os']['distro']['codename']
    instead of
    lsbdistcodename
    But when I try from Inst.2 and I compare with Inst.1 I do not see the same diff. I would like to understand. I tried to purge and reinstall puppet-agent package on Inst.2 . no effect. someone have any idea? there a diff one is much updated then the other one. but doesn’t explain this? I tried to diff the Ruby version. but they are using the same version. Inst.1 :
    Copy code
    # facter lsbdistcodename
    xenial
    # dpkg -l puppet-agent
    ii  puppet-agent                                                 6.24.0-1xenial                      amd64                               The Puppet Agent package contains all of the elements needed to run puppet, including ruby, facter, and hiera.
    # cat /etc/issue
    Ubuntu 16.04.7 LTS \n \l
    Inst.2 :
    Copy code
    # facter lsbdistcodename
    #
    # dpkg -l puppet-agent
    ii  puppet-agent                                                 6.24.0-1xenial                      amd64                               The Puppet Agent package contains all of the elements needed to run puppet, including ruby, facter, and hiera
    # cat /etc/issue
    Ubuntu 16.04.5 LTS \n \l
  • t

    tutelacool

    08/17/2022, 10:55 AM
    okay I know that I can use
    $facts['os']['distro']['codename']
    instead of
    lsbdistcodename
    But when I try from Inst.2 and I compare with Inst.1 I do not see the same diff. I would like to understand. I tried to purge and reinstall puppet-agent package on Inst.2 . no effect. someone have any idea? there a diff one is much updated then the other one. but doesn’t explain this? I tried to differentiate the Ruby version. but they are using the same version. Inst.1 :
    Copy code
    # facter lsbdistcodename
    xenial
    # dpkg -l puppet-agent
    ii  puppet-agent                                                 6.24.0-1xenial                      amd64                               The Puppet Agent package contains all of the elements needed to run puppet, including ruby, facter, and hiera.
    # cat /etc/issue
    Ubuntu 16.04.7 LTS \n \l
    Inst.2 :
    Copy code
    # facter lsbdistcodename
    #
    # dpkg -l puppet-agent
    ii  puppet-agent                                                 6.24.0-1xenial                      amd64                               The Puppet Agent package contains all of the elements needed to run puppet, including ruby, facter, and hiera
    # cat /etc/issue
    Ubuntu 16.04.5 LTS \n \l
  • t

    tutelacool

    08/17/2022, 10:56 AM
    okay I know that I can use
    $facts['os']['distro']['codename']
    instead of
    lsbdistcodename
    But when I try from Inst.2 and I compare with Inst.1 I do not see the same diff. I would like to understand. I tried to purge and reinstall puppet-agent package on Inst.2 . no effect. someone have any idea? there a diff one is much updated then the other one. but doesn’t explain this? I tried to differentiate the Ruby version. but they use the same version. Inst.1 :
    Copy code
    # facter lsbdistcodename
    xenial
    # dpkg -l puppet-agent
    ii  puppet-agent                                                 6.24.0-1xenial                      amd64                               The Puppet Agent package contains all of the elements needed to run puppet, including ruby, facter, and hiera.
    # cat /etc/issue
    Ubuntu 16.04.7 LTS \n \l
    Inst.2 :
    Copy code
    # facter lsbdistcodename
    #
    # dpkg -l puppet-agent
    ii  puppet-agent                                                 6.24.0-1xenial                      amd64                               The Puppet Agent package contains all of the elements needed to run puppet, including ruby, facter, and hiera
    # cat /etc/issue
    Ubuntu 16.04.5 LTS \n \l
  • s

    Slackbot

    08/17/2022, 10:56 AM
    This message was deleted.
    t
    b
    • 3
    • 6
  • l

    Les Shiner

    08/17/2022, 1:10 PM
    looks like I need to install PuppetDB. I currently have a Master/Compiler setup with the Master being the CA. Should I put PuppetDB on it's own server? Or can I put it with the Compiler?
  • v

    vchepkov

    08/17/2022, 1:12 PM
    PE deploys PDB with the compilers
  • l

    Les Shiner

    08/17/2022, 1:12 PM
    I'm using Open Source, sorry I should have clarified
  • v

    vchepkov

    08/17/2022, 1:13 PM
    I understood 🙂
  • b

    bastelfreak

    08/17/2022, 1:14 PM
    if you've some free resources, you can put puppetdb+postgresql on the primary.
  • b

    bastelfreak

    08/17/2022, 1:14 PM
    but a dedicated box works as well
  • l

    Les Shiner

    08/17/2022, 1:14 PM
    ok, thank you guys!
  • l

    Les Shiner

    08/17/2022, 1:15 PM
    wait, primary as in Master(CA) or Compiler?
  • l

    Les Shiner

    08/17/2022, 1:15 PM
    because the master isn't doing much at all
  • b

    bastelfreak

    08/17/2022, 1:15 PM
    where the CA is
  • l

    Les Shiner

    08/17/2022, 1:15 PM
    perfect
  • b

    bastelfreak

    08/17/2022, 1:15 PM
    that's usually called primary (in PE)
  • l

    Les Shiner

    08/17/2022, 1:15 PM
    gotcha!
  • l

    Les Shiner

    08/17/2022, 1:17 PM
    last question (possibly) any specific link I should start with? I see a ton already
  • b

    bastelfreak

    08/17/2022, 1:18 PM
    I usually use theforeman/puppet + puppetlabs/puppetdb module to configure this in opensource
    👍 1
  • d

    Dr Bunsen Honeydew

    08/17/2022, 1:18 PM
    See the
    theforeman-puppet
    module at https://forge.puppet.com/theforeman/puppet?src=slack&channel=puppet
  • l

    Les Shiner

    08/17/2022, 1:35 PM
    anyone else get spammed with
    Copy code
    /usr/lib/ruby/vendor_ruby/puppet_forge/v3/base.rb:59: warning: deprecated Object#=~ is called on URI::HTTPS; it always returns nil
  • l

    Les Shiner

    08/17/2022, 1:35 PM
    when runing r10k deploy environment --puppetfile
  • b

    bastelfreak

    08/17/2022, 1:41 PM
    are you on an older r10k/puppet_forge version?
  • b

    bastelfreak

    08/17/2022, 1:41 PM
    this is a combination of older gems and newer ruby. I think that was fixed in recent r10k
1...134135136...428Latest