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

    Greg

    10/31/2024, 12:38 PM
    https://downloads.puppetlabs.com/puppet-gpg-signing-key-20250406.pub - coming up on 6months til the package signing key expires. Is this being tracked somewhere?
    n
    • 2
    • 6
  • f

    FutureSea Dev

    10/31/2024, 1:17 PM
    Happy Halloween!
    👻 5
    🦇 2
  • d

    David Sandilands

    10/31/2024, 3:52 PM
    set the channel topic: Welcome! Be nice to each other: pup.pt/conduct | Flag a message for moderation with the moderator reaction | https://puppet.statuspage.io | Logs: https://www.linen.dev/s/puppetcommunity/c/puppet
  • l

    Lumiere

    10/31/2024, 3:57 PM
    Referring back to my stdlib thing from yesterday...
    Copy code
    $yamlcontent = versioncmp($facts['puppetversion'], '8.0.0') ? {
        1       => stdlib::to_yaml($subscription_state, { indentation => 2 }),
        default => to_yaml($subscription_state, { indentation => 2 }),
      }
  • l

    Lumiere

    10/31/2024, 3:57 PM
    I know it isn't testing the stdlib version specifically, but I know that we can't use stdlib9 on anything of ours before puppet 8
  • b

    bastelfreak

    10/31/2024, 3:58 PM
    I still don't see why you do this
  • b

    bastelfreak

    10/31/2024, 3:58 PM
    put the old functions in any module and use that in parallel with stdlib? Why the version check?
  • c

    CVQuesty

    10/31/2024, 3:59 PM
    Yeah, that's like using the card catalog to find the computer to look up the book
  • b

    bastelfreak

    10/31/2024, 3:59 PM
    and there's a function to load the metadata.json
  • l

    Lumiere

    10/31/2024, 4:07 PM
    because I don't want to maintain a module with a copy of the code
  • l

    Lumiere

    10/31/2024, 4:07 PM
    this will just do nothing once we get rid of everything but 8
  • d

    David Sandilands

    10/31/2024, 4:29 PM
    I'm aware pup.pt links have stopped working I have raised a case with IT to investigate this affects the community slack, bolt documentation and some bolt command output which refers to the bolt documentation links
    👍🏻 1
  • i

    IlovPuppet

    10/31/2024, 5:19 PM
    Hi, I’m trying to manage a systemd service through hiera. ExecStart parameter has got password ( could be anything). If I encrypt the password, would puppet automatically decrypt it ? We cannot have secrets in repo data
  • l

    Lumiere

    10/31/2024, 6:34 PM
    checkout puppet/eyaml
  • l

    Lumiere

    10/31/2024, 6:35 PM
    https://forge.puppet.com/modules/puppet/hiera/readme
  • d

    Dr Bunsen Honeydew

    10/31/2024, 8:45 PM
    waiting 🧑‍🏫PE Console is about to start up in #CFD8Z9A4T
  • t

    Thomas Lau

    11/01/2024, 6:35 AM
    Folks, I am in a company puppet repo and trying to understand how modules being called, folder under modules/ doesn’t have all the modules listed in Puppetfile but the Puppet run just fine without issue, what’s the logic behind ?
    y
    l
    • 3
    • 7
  • c

    canihavethisone

    11/01/2024, 9:04 AM
    Hi all, I'm thinking of a quick yet reliable way to change a fleet of agents to a new server. I'm thinking something like this in a temporary class that I add to site.pp until all hosts are shutdown. Any thoughts? Is it too dirty?
    Copy code
    exec 'change master':
      command => 'puppet config set master <new master> && rm -rf /etc/puppetlabs/puppet/ssl && echo "done" > /root/puppet_master_changed_certs_purged.txt && shutdown',
      creates => '/root/puppet_master_changed_certs_purged.txt',
    }
    y
    b
    +3
    • 6
    • 19
  • m

    matt

    11/01/2024, 10:41 AM
    I've got an edge use case, and I'm wondering if puppet could handle it for me. I'm trying to configure network interfaces on a RedHat 9 devices. old school this would have been easy with puppet just dropping files in, but moving to network manage adds complexity. There is even more complexity as network manage has a bug/design flaw for me edge use case that requires me to edit/fix a file post device creation. I think I 'could' fix this by going back to dropping pre-configured/puppet managed connection files in place like redhat 7 type resources, however network manager create UUID's within the files that would not be able to be generated by puppet (I believe I can exclude the UUID from the files with. no problem but I'm not finished testing)
    y
    b
    +2
    • 5
    • 14
  • m

    matt

    11/01/2024, 10:41 AM
    anyone doing anything with puppet on network manager ?
    v
    c
    k
    • 4
    • 14
  • o

    Oleksandr Bilko

    11/01/2024, 3:11 PM
    Hello! Please, help me fix the ‘ERROR Facter - Could not load puppet gem, got cannot load such file -- puppet’ error. Here is my custom fact:
    Copy code
    require 'facter'
    
    # Detect Broadcom/LSI RAID
    Facter.add(:has_broadcom) do
      confine kernel: 'Linux'
      ENV["PATH"] = "/bin:/sbin:/usr/bin:/usr/sbin"
    
      setcode do
        if Facter::Util::Resolution.which('lspci') && Facter::Util::Resolution.which('grep')
          Facter::Util::Resolution.exec("lspci | grep -i 'raid' | grep -iqE 'Broadcom|LSI|MegaRaid'") != nil
        else
          false
        end
      end
    end
    Here is the output `facter -p`:
    Copy code
    # facter -p | grep 'has_broadcom'
    [2024-11-01 15:04:08.536918 ] ERROR Facter - Could not load puppet gem, got cannot load such file -- puppet
    Here is the output `puppet facts`:
    Copy code
    # puppet facts | grep 'has_broadcom'
      "has_broadcom": true,
    b
    d
    y
    • 4
    • 28
  • v

    vchepkov

    11/01/2024, 3:27 PM
    I would just do
    Copy code
    Facter.add(:has_broadcom) do
    	confine :kernel => "Linux"
    	setcode do
    		Facter::Core::Execution.execute("lspci | grep -iqE 'Broadcom|LSI|MegaRaid' | grep -i RAID").to_s != ''
    	end
    end
  • b

    bastelfreak

    11/01/2024, 3:28 PM
    //o\
    💯 1
  • d

    Davit Gurgenidze

    11/02/2024, 5:33 PM
    Hello, please suggest the proper way for puppet and ci/cd I have puppet code on my private repo, using R10K to puppet master node to pull the changes from repo. question: how do I force the (affected/all)nodes to apply the configuration instantly in this flow?
    b
    • 2
    • 3
  • j

    John Warburton

    11/04/2024, 4:26 AM
    Hi Is it ok to dynamically create multiple top-level facts within a setcode block in facter? The docs say
    there must not be any code outside
    setcode
    and
    confine
    blocks
    What does "any" mean in this case? Can I wrap my
    Facter.add
    in a loop like:
    Copy code
    Facter.value('networking')['interfaces'].each do |i, val|
      Facter.add("myfact_#{i}") do
        setcode do
          "value_for_#{i}"
        end
      end
    end
    Technically this works, but is that
    each
    loop "any code outside `setcode`"? And yes, I am aware a structured fact is the real answer. I would use an external fact if I could but I need to reference the
    networking
    fact I arrived here due to a lot of legacy
    facter
    code with a lot of code outside
    setcode
    which has just started manifesting in indeterminate fact values, and is fixed by shoving code inside the `setcode`s. I can reduce the amount of change by getting the top level facts in order before changing these facts to structured facts. Comments and opinions gratefully accepted Thanks John
    d
    y
    • 3
    • 7
  • s

    Slackbot

    11/04/2024, 2:00 PM
    This message was deleted.
    s
    • 2
    • 1
  • s

    Stephen

    11/04/2024, 2:05 PM
    Has anyone ever encountered a scenario when running puppet rspec where a parameter given in puppet code overrides that parameter given in hiera? Normally its the exact opposite, and indeed on the real server the hiera overrides the puppet code.
  • b

    bastelfreak

    11/04/2024, 2:07 PM
    are you sure that rspec-puppet is using your Hiera data? And ist that data you pass to a class when you instantiate it or default data in the class itself?
  • s

    Stephen

    11/04/2024, 2:09 PM
    I added a spoof class load to the hiera and it loaded, so I am 100% sure its loaded
  • s

    Stephen

    11/04/2024, 2:10 PM
    It is a boolean parameter set on the class instantiation. The param has a default of false, but we set it to false anyways (not sure why, maybe legacy, maybe belt and braces). The hiera parameter sets it to true
1...421422423...428Latest