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

    romgo

    09/23/2022, 2:42 PM
    This looks like this :
    Copy code
    package { 'taniumclient':
          name     => $name_pck,
          ensure   => present,
          provider => $provider,
          source   => "${puppet_tanium::install_path}/${package_name}",
          require  => File["${puppet_tanium::install_path}/${package_name}"],
        }
    where $name_pck has been defined for redhat and debian has taniumclient_7.4.7.1094-debian10_amd64.deb & TaniumClient-7.4.8.1054-1.rhe7.x86_64.rpm
  • s

    Slackbot

    09/23/2022, 2:42 PM
    This message was deleted.
    r
    • 2
    • 1
  • r

    romgo

    09/23/2022, 2:43 PM
    This doesn't look right to me the name parameters should be the output of dpkg --list | grep Tanium right ?
  • r

    ramindk

    09/23/2022, 4:16 PM
    Looks reasonable to me. I'd force the name to be the same on both OS for simplicity if possible unless there are external reasons you can't control. In regards to your dpkg question $nam_pck should match whatever dpkg/yum returns. In the case of a mismatch, Puppet will attempt to reinstall the package every run. This is common when a module defines a package
    apache
    and the OS happily helps by installing
    apache2
    for the module. Puppet runs, sees no
    apache
    package and attempts to install it.
  • s

    Slackbot

    09/23/2022, 5:50 PM
    This message was deleted.
    g
    n
    b
    • 4
    • 11
  • s

    Slackbot

    09/23/2022, 5:51 PM
    This message was deleted.
    n
    s
    • 3
    • 2
  • g

    Gowtham

    09/23/2022, 5:56 PM
    can anyone help on this
  • g

    Gowtham

    09/23/2022, 6:22 PM
    yes windows node also in AWS
  • s

    sameer

    09/25/2022, 6:37 PM
    Hello, I have removed one of the galera node from puppetdb(basically removed the yaml file from facts in master and revoke certificate with master) and stopped the puppet. Its already few days and still the node is connected to the cluster where it shouldn't happen as we removed its data from puppet and the ip's are dynamically assigned. Any idea or suggestion what the problem could be. I have seen in puppet website that when puppetdb processor is enabled then the removed or deactivated node would be there till 14 days. Is there anything i can do more to get ride of this node?
  • s

    sameer

    09/25/2022, 6:39 PM
    Hello, I have removed one of the galera node from puppetdb(basically removed the yaml file from facts in master and revoke certificate with master) and stopped the puppet. Its already few days and still the node is connected to the cluster where it shouldn't happen as we removed its data from puppet and the ip's are dynamically assigned. Any idea or suggestion what the problem could be. I have seen in puppet website that when puppetdb processor is enabled then the removed or deactivated node would be there till 14 days. Is there anything i can do more to get ride of this node?
  • p

    Patrick Rynhart

    09/25/2022, 10:18 PM
    Hi all - Is there a way (via Puppet) to access the equivalent of the alternatives command ?
  • s

    Slackbot

    09/25/2022, 10:18 PM
    This message was deleted.
    c
    p
    • 3
    • 2
  • p

    Patrick Rynhart

    09/25/2022, 10:19 PM
    I would like to use Puppet to set the default to Java 11 if possible
  • s

    Steve Handy

    09/26/2022, 3:41 AM
    message has been deleted
  • s

    Steve Handy

    09/26/2022, 3:42 AM
    message has been deleted
  • s

    Steve Handy

    09/26/2022, 3:49 AM
    Good Day All, Can someone please assist? I am trying to use Puppet to check if a software package is already installed. I have loaded a windows node's software listing into the Puppetmaster. I can view the software facts via Foreman. My basic script uses chocolatey like this and it works: class standardsoftware($list = []) { include chocolatey package { $list: ensure => latest, provider => 'chocolatey', } } But i would like to first check if the software package is already installed and if so, use the bottom code but its not working. (I have a global Boolean variable $installedpackage defined in Foreman). class updatesoftware($list = []) { include chocolatey $a = $facts['software'] $installedpackage=false $a.each |$i, $b| { $c = downcase($b) $d = regsubst($c, " ", "") if (match($list,$d) or $list in $d) { $installedpackage=true } } if ("${installedpackage}") { package { $list: ensure => latest, provider => 'chocolatey', } } } Can someone assist? Thanks
  • s

    Steve Handy

    09/26/2022, 3:50 AM
    Good Day All, Can someone please assist? I am trying to use Puppet to check if a software package is already installed. I have loaded a windows node's software listing into the Puppetmaster. I can view the software facts via Foreman. My basic script uses chocolatey like this and it works: class standardsoftware($list = []) { include chocolatey package { $list: ensure => latest, provider => 'chocolatey', } } But i would like to first check if the software package is already installed and if so, use the bottom code but its not working. (I have a global Boolean variable $installedpackage defined in Foreman). class updatesoftware($list = []) { include chocolatey $a = $facts['software'] $installedpackage=false $a.each |$i, $b| { $c = downcase($b) $d = regsubst($c, " ", "") if (match($list,$d) or $list in $d) { $installedpackage=true } } if ("${installedpackage}") { package { $list: ensure => latest, provider => 'chocolatey', } } } Can someone assist? Thanks
  • k

    kenyon

    09/26/2022, 3:52 AM
    you want to declare desired state and configuration, not check for whether a thing is installed. that’s an anti-pattern in puppet.
  • s

    Steve Handy

    09/26/2022, 4:14 AM
    @kenyon - Yes you right...but can it still be done?
  • s

    Slackbot

    09/26/2022, 9:08 AM
    This message was deleted.
    s
    d
    • 3
    • 4
  • d

    David Sandilands

    09/26/2022, 9:08 AM
    @Steve Handy I guess writing a custom fact which looked at the software fact and checked would be a way but if you are only wanting to install latest IF its a new package using ensure => present or installed would achieve that. What is it you want to get out of this approach?
  • d

    David Sandilands

    09/26/2022, 9:08 AM
    @Steve Handy I guess writing a custom fact which used the software fact and checked would be a way but if you are only wanting to install latest IF its a new package using ensure => present or installed would achieve that. What is it you want to get out of this approach?
  • j

    Joel Wilson

    09/26/2022, 3:48 PM
    In the https://puppet.com/docs/puppet/7/server/puppet_server_metrics.html#statistical-metrics article, is time there in seconds or milliseconds? I wish the article would say.
  • j

    Joel Wilson

    09/26/2022, 3:48 PM
    For like compiler.mean
  • s

    Slackbot

    09/26/2022, 4:16 PM
    This message was deleted.
    c
    j
    • 3
    • 4
  • s

    Slackbot

    09/26/2022, 5:25 PM
    This message was deleted.
    t
    b
    h
    • 4
    • 5
  • n

    Nirav

    09/26/2022, 5:25 PM
    Hello folks, I am looking at a _core module and wonder if that has to be explicitly imported ? I have puppetv6 servers module in question is mount_core module
  • n

    Nirav

    09/26/2022, 5:29 PM
    Hello folks, I am looking at a _core module and wonder if that has to be explicitly imported or is it pre-packaged in opensource v6 version of puppetserver ? I have puppetv6 servers module in question is mount_core module
  • t

    thedonkdonk

    09/26/2022, 5:30 PM
    Yes, explicitly imported. It's a module like any other now https://forge.puppetlabs.com/modules/puppetlabs/mount_core
  • c

    csharpsteen

    09/26/2022, 6:05 PM
    The
    mean
    is in milliseconds (see
    DurationUnit
    ):
    Copy code
    $ curl -k --cert "$(puppet config print hostcert)" --key "$(puppet config print hostprivkey)" '<https://localhost:8140/metrics/v2/read/puppetserver:name=*.compiler>' |python3 -m json.tool
    {
        "request": {
            "mbean": "puppetserver:name=*.compiler",
            "type": "read"
        },
        "value": {
            "puppetserver:name=puppetlabs.clspe2-928bbc-0.compiler": {
                "Mean": 26.034399792236776,
                "StdDev": 248.19908355690887,
                "75thPercentile": 3.0,
                "98thPercentile": 175.0,
                "RateUnit": "events/second",
                "99thPercentile": 494.0,
                "95thPercentile": 32.0,
                "Max": 5119.0,
                "Count": 4897,
                "FiveMinuteRate": 0.018434010775438155,
                "50thPercentile": 1.0,
                "MeanRate": 0.6950233208908544,
                "Min": 0.0,
                "OneMinuteRate": 3.8211971028211754e-11,
                "DurationUnit": "milliseconds",
                "999thPercentile": 5119.0,
                "FifteenMinuteRate": 0.2613376705576153
            }
        },
        "timestamp": 1664215341,
        "status": 200
    }
1...173174175...428Latest