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

    Slackbot

    08/02/2022, 8:57 AM
    This message was deleted.
    n
    • 2
    • 1
  • m

    matt

    08/02/2022, 8:58 AM
    my example is using a hashicorp consul config, where the parameters are defined as a hash, I've mapped out the background config here https://gist.github.com/ikonia/655a3204b08132566b20e5ceda36a2b1 I've got a common config that 'all nodes' take and I've got a node specific config that I want to add just 1 additional set of params to, however because I don't understand how to ensure that that the merge behaviour will just 'add' the additional params to that node, I have to copy out the whole definition with the additional param included
  • m

    matt

    08/02/2022, 8:59 AM
    what is the correct merge approach to ensure that the node specific config just needs the additional lines for 'bind-exporter' rather than the whole service definition replicated from common
  • m

    matt

    08/02/2022, 9:01 AM
    (hopefully the background example demonstrates the gap I'm trying to plug knowledge wise)
  • s

    Slackbot

    08/02/2022, 9:02 AM
    This message was deleted.
    t
    m
    h
    • 4
    • 55
  • s

    Slackbot

    08/02/2022, 11:43 AM
    This message was deleted.
    b
    j
    +2
    • 5
    • 9
  • s

    Slackbot

    08/02/2022, 4:34 PM
    This message was deleted.
    f
    • 2
    • 1
  • d

    Dr Bunsen Honeydew

    08/02/2022, 4:45 PM
    allthethings 🧑‍🏫Puppet Core Team is about to start up in #CFD8Z9A4T
  • b

    Brian Schonecker

    08/02/2022, 7:43 PM
    Is there a way in the package resource to disable a repository when installing a package on RHEL? I have two repositories that are hosting multiple copies of a package and I'd like to "prefer" one yum repository over another. Something like "disablerepo:" in Ansible. I haven't found anything in the docs that look like this behavior is possible. I can't disable the repository permanently in the short term.
  • b

    Brian Schonecker

    08/02/2022, 7:45 PM
    Perhaps the install_options with "--disablerepo=disable_me" would work? I'll try that and report back.
  • s

    Slackbot

    08/02/2022, 7:48 PM
    This message was deleted.
    b
    l
    • 3
    • 4
  • b

    Brian Schonecker

    08/02/2022, 7:50 PM
    So, yes, install_options does disable the unwanted repository when used thusly:
    package { 'snmpd':
    ensure => $package_ensure,
    name   => $package_name,
    install_options => '--disablerepo=disable_me',
    }
  • s

    Slackbot

    08/02/2022, 7:52 PM
    This message was deleted.
    b
    b
    r
    • 4
    • 10
  • d

    Dr Bunsen Honeydew

    08/02/2022, 7:52 PM
    See the
    puppet-snmp
    module at https://forge.puppet.com/puppet/snmp?src=slack&channel=puppet
  • s

    Slackbot

    08/02/2022, 8:46 PM
    This message was deleted.
    b
    g
    • 3
    • 31
  • g

    Gerard Ryan

    08/02/2022, 8:55 PM
    Oh cool, super helpful. I've got a bunch of clients who are connected over VPN and check in infrequently. How will they be impacted by the swap? Not at all? (provided they checked in after I added the CA management capability, as recommended, correct?)
  • g

    Gerard Ryan

    08/02/2022, 9:01 PM
    Will it be eligible for the expiry extension to 15 years?
  • g

    Gerard Ryan

    08/02/2022, 9:03 PM
    Folks here were hoping they made the SME hire before the certs expired
  • f

    fe80

    08/02/2022, 10:53 PM
    I think you need to explain more which part of code you need
  • s

    Slackbot

    08/03/2022, 12:36 AM
    This message was deleted.
    b
    p
    a
    • 4
    • 4
  • s

    Slackbot

    08/03/2022, 9:46 AM
    This message was deleted.
    z
    p
    k
    • 4
    • 4
  • t

    tuxmea

    08/03/2022, 10:23 AM
    the merge options for lookup_options is hardcoded to first and can not be overwritten!
  • t

    tuxmea

    08/03/2022, 10:28 AM
    Layer ordering is always taken into account. If you add common above the node layer, then common will be searched first.
  • a

    aperna

    08/03/2022, 1:56 PM
    HI ,
  • s

    Slackbot

    08/03/2022, 1:59 PM
    This message was deleted.
    b
    a
    s
    • 4
    • 9
  • o

    Oleksandr Lytvyn

    08/03/2022, 4:10 PM
    Hello, please advice, how to properly trigger update action on yum repository? Right now i have next block:
    Copy code
    class profile::zabbix_agent {
      $zabbix_server                = lookup('profile::zabbix_agent::server', String)
      $zabbix_enabled               = lookup('profile::zabbix_agent::enabled', Boolean, 'first', true)
      $host_metadata                = lookup('profile::zabbix_agent::host_metadata', String)
      $zabbix_repo_url              = lookup('profile::zabbix_agent::zabbix_repo_url', String, undef, '<https://repo.zabbix.com>')
      $zabbix_major_version         = lookup('profile::zabbix_agent::zabbix_major_version', Float, undef, 5.0)
      $zabbix_minor_repo_version    = lookup('profile::zabbix_agent::zabbix_minor_repo_version', Integer, undef, 1)
    
    
      if $zabbix_enabled {
        case $::operatingsystem {
          'Ubuntu': {
            apt::source { 'zabbix_agent_repo':
              location => "${zabbix_repo_url}/zabbix/${zabbix_major_version}/ubuntu",
              include  => { 'deb' => true, 'src' => false, },
              repos    => 'main',
              release  => $::lsbdistcodename,
              key      => {
                'id'     => 'A1848F5352D022B9471D83D0082AB56BA14FE591',
                'source' => "${zabbix_repo_url}/zabbix-official-repo.key",
              },
            }
    
            Class['apt::update'] -> Package <| provider == 'apt' |>
    
            package { 'zabbix-agent2':
              ensure  => installed,
              require => [Class['apt::update'], Apt::Source['zabbix_agent_repo']],
            }
    
            file { '/etc/apt/sources.list.d/zabbix_agent_deb.list':
              ensure => absent,
            }
          }
          'RedHat', 'CentOS': {
            package { 'zabbix-release':
              ensure => 'installed',
              source => "${zabbix_repo_url}/zabbix/${zabbix_major_version}/rhel/${::operatingsystemmajrelease}/x86_64/zabbix-release-\
    ${zabbix_major_version}-${zabbix_minor_repo_version}.el${::operatingsystemmajrelease}.noarch.rpm"
            }
    
            package { 'zabbix-agent2':
              ensure  => installed,
              require => Package['zabbix-release'],
            }
          }
          default: {
            fail('ERROR: unknown OS distro!')
          }
        }
    I updated versions to:
    Copy code
    $zabbix_major_version         = lookup('profile::zabbix_agent::zabbix_major_version', Float, undef, 6.0)
      $zabbix_minor_repo_version    = lookup('profile::zabbix_agent::zabbix_minor_repo_version', Integer, undef, 2)
    but it doesn't lead to anything on RHEL based systems. Also tried to modify like this:
    Copy code
    package { 'zabbix-release':
              ensure => 'latest',
              source => "${zabbix_repo_url}/zabbix/${zabbix_major_version}/rhel/${::operatingsystemmajrelease}/x86_64/zabbix-release-\
    ${zabbix_major_version}-${zabbix_minor_repo_version}.el${::operatingsystemmajrelease}.noarch.rpm",
              notify   => Exec['update_yum_cache'],
            }
    
            package { 'zabbix-agent2':
              ensure  => latest,
              require => [Package['zabbix-release'], Exec['update_yum_cache']],
            }
          }
    
        exec { 'update_yum_cache':
          path        => ['/usr/bin', '/usr/sbin', '/bin'],
          command     => 'yum check-update',
          refreshonly => true,
        }
    It's simply doesn't want to change version of
    zabbix-release
    package on RHEL based systems Main goal is to force yum to update cache so then newer version of
    zabbix-release
    package is installed
  • o

    Oleksandr Lytvyn

    08/03/2022, 4:11 PM
    Hello, please advice, how to properly trigger update action on yum repository? Right now i have next block:
    Copy code
    class profile::zabbix_agent {
      $zabbix_server                = lookup('profile::zabbix_agent::server', String)
      $zabbix_enabled               = lookup('profile::zabbix_agent::enabled', Boolean, 'first', true)
      $host_metadata                = lookup('profile::zabbix_agent::host_metadata', String)
      $zabbix_repo_url              = lookup('profile::zabbix_agent::zabbix_repo_url', String, undef, '<https://repo.zabbix.com>')
      $zabbix_major_version         = lookup('profile::zabbix_agent::zabbix_major_version', Float, undef, 5.0)
      $zabbix_minor_repo_version    = lookup('profile::zabbix_agent::zabbix_minor_repo_version', Integer, undef, 1)
    
    
      if $zabbix_enabled {
        case $::operatingsystem {
          'Ubuntu': {
            apt::source { 'zabbix_agent_repo':
              location => "${zabbix_repo_url}/zabbix/${zabbix_major_version}/ubuntu",
              include  => { 'deb' => true, 'src' => false, },
              repos    => 'main',
              release  => $::lsbdistcodename,
              key      => {
                'id'     => 'A1848F5352D022B9471D83D0082AB56BA14FE591',
                'source' => "${zabbix_repo_url}/zabbix-official-repo.key",
              },
            }
    
            Class['apt::update'] -> Package <| provider == 'apt' |>
    
            package { 'zabbix-agent2':
              ensure  => installed,
              require => [Class['apt::update'], Apt::Source['zabbix_agent_repo']],
            }
    
            file { '/etc/apt/sources.list.d/zabbix_agent_deb.list':
              ensure => absent,
            }
          }
          'RedHat', 'CentOS': {
            package { 'zabbix-release':
              ensure => 'installed',
              source => "${zabbix_repo_url}/zabbix/${zabbix_major_version}/rhel/${::operatingsystemmajrelease}/x86_64/zabbix-release-\
    ${zabbix_major_version}-${zabbix_minor_repo_version}.el${::operatingsystemmajrelease}.noarch.rpm"
            }
    
            package { 'zabbix-agent2':
              ensure  => installed,
              require => Package['zabbix-release'],
            }
          }
          default: {
            fail('ERROR: unknown OS distro!')
          }
        }
    I updated versions to:
    Copy code
    $zabbix_major_version         = lookup('profile::zabbix_agent::zabbix_major_version', Float, undef, 6.0)
      $zabbix_minor_repo_version    = lookup('profile::zabbix_agent::zabbix_minor_repo_version', Integer, undef, 2)
    but it doesn't lead to anything
  • o

    Oleksandr Lytvyn

    08/03/2022, 4:12 PM
    Hello, please advice, how to properly trigger update action on yum repository? Right now i have next block:
    Copy code
    class profile::zabbix_agent {
      $zabbix_server                = lookup('profile::zabbix_agent::server', String)
      $zabbix_enabled               = lookup('profile::zabbix_agent::enabled', Boolean, 'first', true)
      $host_metadata                = lookup('profile::zabbix_agent::host_metadata', String)
      $zabbix_repo_url              = lookup('profile::zabbix_agent::zabbix_repo_url', String, undef, '<https://repo.zabbix.com>')
      $zabbix_major_version         = lookup('profile::zabbix_agent::zabbix_major_version', Float, undef, 5.0)
      $zabbix_minor_repo_version    = lookup('profile::zabbix_agent::zabbix_minor_repo_version', Integer, undef, 1)
    
    
      if $zabbix_enabled {
        case $::operatingsystem {
          'Ubuntu': {
            apt::source { 'zabbix_agent_repo':
              location => "${zabbix_repo_url}/zabbix/${zabbix_major_version}/ubuntu",
              include  => { 'deb' => true, 'src' => false, },
              repos    => 'main',
              release  => $::lsbdistcodename,
              key      => {
                'id'     => 'A1848F5352D022B9471D83D0082AB56BA14FE591',
                'source' => "${zabbix_repo_url}/zabbix-official-repo.key",
              },
            }
    
            Class['apt::update'] -> Package <| provider == 'apt' |>
    
            package { 'zabbix-agent2':
              ensure  => installed,
              require => [Class['apt::update'], Apt::Source['zabbix_agent_repo']],
            }
    
            file { '/etc/apt/sources.list.d/zabbix_agent_deb.list':
              ensure => absent,
            }
          }
          'RedHat', 'CentOS': {
            package { 'zabbix-release':
              ensure => 'installed',
              source => "${zabbix_repo_url}/zabbix/${zabbix_major_version}/rhel/${::operatingsystemmajrelease}/x86_64/zabbix-release-\
    ${zabbix_major_version}-${zabbix_minor_repo_version}.el${::operatingsystemmajrelease}.noarch.rpm"
            }
    
            package { 'zabbix-agent2':
              ensure  => installed,
              require => Package['zabbix-release'],
            }
          }
          default: {
            fail('ERROR: unknown OS distro!')
          }
        }
    I updated versions to:
    Copy code
    $zabbix_major_version         = lookup('profile::zabbix_agent::zabbix_major_version', Float, undef, 6.0)
      $zabbix_minor_repo_version    = lookup('profile::zabbix_agent::zabbix_minor_repo_version', Integer, undef, 2)
    but it doesn't lead to anything on RHEL based systems
  • o

    Oleksandr Lytvyn

    08/03/2022, 4:13 PM
    Hello, please advice, how to properly trigger update action on yum repository? Right now i have next block:
    Copy code
    class profile::zabbix_agent {
      $zabbix_server                = lookup('profile::zabbix_agent::server', String)
      $zabbix_enabled               = lookup('profile::zabbix_agent::enabled', Boolean, 'first', true)
      $host_metadata                = lookup('profile::zabbix_agent::host_metadata', String)
      $zabbix_repo_url              = lookup('profile::zabbix_agent::zabbix_repo_url', String, undef, '<https://repo.zabbix.com>')
      $zabbix_major_version         = lookup('profile::zabbix_agent::zabbix_major_version', Float, undef, 5.0)
      $zabbix_minor_repo_version    = lookup('profile::zabbix_agent::zabbix_minor_repo_version', Integer, undef, 1)
    
    
      if $zabbix_enabled {
        case $::operatingsystem {
          'Ubuntu': {
            apt::source { 'zabbix_agent_repo':
              location => "${zabbix_repo_url}/zabbix/${zabbix_major_version}/ubuntu",
              include  => { 'deb' => true, 'src' => false, },
              repos    => 'main',
              release  => $::lsbdistcodename,
              key      => {
                'id'     => 'A1848F5352D022B9471D83D0082AB56BA14FE591',
                'source' => "${zabbix_repo_url}/zabbix-official-repo.key",
              },
            }
    
            Class['apt::update'] -> Package <| provider == 'apt' |>
    
            package { 'zabbix-agent2':
              ensure  => installed,
              require => [Class['apt::update'], Apt::Source['zabbix_agent_repo']],
            }
    
            file { '/etc/apt/sources.list.d/zabbix_agent_deb.list':
              ensure => absent,
            }
          }
          'RedHat', 'CentOS': {
            package { 'zabbix-release':
              ensure => 'installed',
              source => "${zabbix_repo_url}/zabbix/${zabbix_major_version}/rhel/${::operatingsystemmajrelease}/x86_64/zabbix-release-\
    ${zabbix_major_version}-${zabbix_minor_repo_version}.el${::operatingsystemmajrelease}.noarch.rpm"
            }
    
            package { 'zabbix-agent2':
              ensure  => installed,
              require => Package['zabbix-release'],
            }
          }
          default: {
            fail('ERROR: unknown OS distro!')
          }
        }
    I updated versions to:
    Copy code
    $zabbix_major_version         = lookup('profile::zabbix_agent::zabbix_major_version', Float, undef, 6.0)
      $zabbix_minor_repo_version    = lookup('profile::zabbix_agent::zabbix_minor_repo_version', Integer, undef, 2)
    but it doesn't lead to anything on RHEL based systems. Also tried to modify like this:
    Copy code
    package { 'zabbix-release':
              ensure => 'latest',
              source => "${zabbix_repo_url}/zabbix/${zabbix_major_version}/rhel/${::operatingsystemmajrelease}/x86_64/zabbix-release-\
    ${zabbix_major_version}-${zabbix_minor_repo_version}.el${::operatingsystemmajrelease}.noarch.rpm",
              notify   => Exec['update_yum_cache'],
            }
    
            package { 'zabbix-agent2':
              ensure  => latest,
              require => [Package['zabbix-release'], Exec['update_yum_cache']],
            }
          }
    
        exec { 'update_yum_cache':
          path        => ['/usr/bin', '/usr/sbin', '/bin'],
          command     => 'yum check-update',
          refreshonly => true,
        }
    It's simply doesn't want to change version of
    zabbix-release
    package on RHEL based systems
  • o

    Oleksandr Lytvyn

    08/03/2022, 4:19 PM
    Hello, please advice, how to properly trigger update action on yum repository? Right now i have next block:
    Copy code
    class profile::zabbix_agent {
      $zabbix_server                = lookup('profile::zabbix_agent::server', String)
      $zabbix_enabled               = lookup('profile::zabbix_agent::enabled', Boolean, 'first', true)
      $host_metadata                = lookup('profile::zabbix_agent::host_metadata', String)
      $zabbix_repo_url              = lookup('profile::zabbix_agent::zabbix_repo_url', String, undef, '<https://repo.zabbix.com>')
      $zabbix_major_version         = lookup('profile::zabbix_agent::zabbix_major_version', Float, undef, 5.0)
      $zabbix_minor_repo_version    = lookup('profile::zabbix_agent::zabbix_minor_repo_version', Integer, undef, 1)
    
    
      if $zabbix_enabled {
        case $::operatingsystem {
          'Ubuntu': {
            apt::source { 'zabbix_agent_repo':
              location => "${zabbix_repo_url}/zabbix/${zabbix_major_version}/ubuntu",
              include  => { 'deb' => true, 'src' => false, },
              repos    => 'main',
              release  => $::lsbdistcodename,
              key      => {
                'id'     => 'A1848F5352D022B9471D83D0082AB56BA14FE591',
                'source' => "${zabbix_repo_url}/zabbix-official-repo.key",
              },
            }
    
            Class['apt::update'] -> Package <| provider == 'apt' |>
    
            package { 'zabbix-agent2':
              ensure  => installed,
              require => [Class['apt::update'], Apt::Source['zabbix_agent_repo']],
            }
    
            file { '/etc/apt/sources.list.d/zabbix_agent_deb.list':
              ensure => absent,
            }
          }
          'RedHat', 'CentOS': {
            package { 'zabbix-release':
              ensure => 'installed',
              source => "${zabbix_repo_url}/zabbix/${zabbix_major_version}/rhel/${::operatingsystemmajrelease}/x86_64/zabbix-release-\
    ${zabbix_major_version}-${zabbix_minor_repo_version}.el${::operatingsystemmajrelease}.noarch.rpm"
            }
    
            package { 'zabbix-agent2':
              ensure  => installed,
              require => Package['zabbix-release'],
            }
          }
          default: {
            fail('ERROR: unknown OS distro!')
          }
        }
    I updated versions to:
    Copy code
    $zabbix_major_version         = lookup('profile::zabbix_agent::zabbix_major_version', Float, undef, 6.0)
      $zabbix_minor_repo_version    = lookup('profile::zabbix_agent::zabbix_minor_repo_version', Integer, undef, 2)
    but it doesn't lead to anything on RHEL based systems. Also tried to modify like this:
    Copy code
    package { 'zabbix-release':
              ensure => 'latest',
              source => "${zabbix_repo_url}/zabbix/${zabbix_major_version}/rhel/${::operatingsystemmajrelease}/x86_64/zabbix-release-\
    ${zabbix_major_version}-${zabbix_minor_repo_version}.el${::operatingsystemmajrelease}.noarch.rpm",
              notify   => Exec['update_yum_cache'],
            }
    
            package { 'zabbix-agent2':
              ensure  => latest,
              require => [Package['zabbix-release'], Exec['update_yum_cache']],
            }
          }
    
        exec { 'update_yum_cache':
          path        => ['/usr/bin', '/usr/sbin', '/bin'],
          command     => 'yum check-update',
          refreshonly => true,
        }
    It's simply doesn't want to change version of
    zabbix-release
    package on RHEL based systems Main goal is to force yum to update cache so then newer version of
    zabbix-release
    package is installed
1...117118119...428Latest