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

    Brian Schonecker

    07/07/2022, 8:20 PM
    then change hiera.yaml datadir = <blah>/${my_hierarchy}
  • b

    Brian Schonecker

    07/07/2022, 8:20 PM
    ooo....even better.
  • n

    natemccurdy

    07/07/2022, 8:21 PM
    Then I can just do this in the hierarchy:
    Copy code
    id/%{identifier_paths}.yaml
  • b

    Brian Schonecker

    07/07/2022, 8:22 PM
    You're tinkering with the wild west with all those hierarchies, IMHO. How will you control sprawl?
  • r

    ramindk

    07/07/2022, 8:23 PM
    I like it. IIRC role comes from your enc in that env. You shouldn't have to deal with any strangeness of locally specified role not matching enc role.
  • n

    natemccurdy

    07/07/2022, 8:24 PM
    Good question 🙂 Welcome to my life. Having consistent and useful variables in the ENC is one way of controlling it, so I think this new idea is a good one.
  • r

    ramindk

    07/07/2022, 8:25 PM
    You're completely mostly avoiding data merging in this case?
  • r

    ramindk

    07/07/2022, 8:26 PM
    You're completely mostly voiding data merging in this case?
  • r

    ramindk

    07/07/2022, 8:26 PM
    You're completely mostly avoiding data merging in this case?
  • n

    natemccurdy

    07/07/2022, 8:26 PM
    Yeah, this is tangential to data merging. It doesn’t change how a team uses this data, just simplifies how they can write a hierarchy for roles with an arbitrary number of segments..
  • r

    ramindk

    07/07/2022, 8:27 PM
    Okay that makes more sense. More of a convention for where local data goes than dealing with the common/specific case of config data per role.
  • r

    ramindk

    07/07/2022, 8:28 PM
    Okay that makes more sense. More of a convention for where local data goes than dealing with the common/specific case of config data per role.
  • b

    Brian Schonecker

    07/07/2022, 8:46 PM
    @natemccurdy what ENC are you using?
  • b

    Brian Schonecker

    07/07/2022, 8:47 PM
    I'm building a new puppet environment after being out of the puppet business for five years and I'm always open to new ideas.
  • n

    natemccurdy

    07/07/2022, 8:47 PM
    A custom one. Just a Python script that reads from an inventory management system’s API.
    👍 1
  • b

    Brian Schonecker

    07/07/2022, 8:54 PM
    #C0W298S9G I'm building a Puppet open-source environment and am building/destroying virtual machines and docker containers 20/30 times a day to test my automation. Is there a way to 'reuse' the client's certificate on the Puppet server so that I don't have to "puppetserver ca clean --certname=test.example.com" every time I rebuild test.example.com and it registers itself (anew) to the Puppet server?
  • n

    natemccurdy

    07/07/2022, 8:56 PM
    Sure, just save the generated certificate somewhere in a central place, and during provsiioning of the automated system, use that shared cert.
  • n

    natemccurdy

    07/07/2022, 8:56 PM
    “use it” by placing it in
    /etc/puppetlabs/puppet/ssl/...
    before running Puppet for the first time
  • v

    vchepkov

    07/07/2022, 8:57 PM
    https://puppet.com/docs/puppet/7/configuration.html#allow-duplicate-certs
  • b

    Brian Schonecker

    07/07/2022, 8:57 PM
    woot, woot! Thanks!
  • b

    Brian Schonecker

    07/07/2022, 8:58 PM
    I assume allow-duplicate-certs is global and is somewhat dangerous. 😉
  • n

    natemccurdy

    07/07/2022, 9:14 PM
    Yes, allow_duplicate_certs is global.
  • s

    Slackbot

    07/07/2022, 9:31 PM
    This message was deleted.
    n
    h
    • 3
    • 22
  • h

    Hugh Esco

    07/07/2022, 10:50 PM
    Next: /etc/puppetlabs/puppet/puppet.conf --
    Copy code
    [main]
    server = pm5.${my_domain}.com
    stage = ci
    [master]
    masterport = 8240
    report_port = 8240
    vardir = /opt/puppetlabs/server/data/puppetserver
    logdir = /var/log/puppetlabs/puppetserver
    rundir = /var/run/puppetlabs/puppetserver
    pidfile = /var/run/puppetlabs/puppetserver/puppetserver.pid
    codedir = /etc/puppetlabs/code
    autosign = /etc/puppetlabs/puppet/autosign.sh
    [agent]
    environment = ymd_infra
    masterport = 8140
    [server]
    ca_port = 8140
    ca_server = 127.0.0.1
    masterport = 8240
  • h

    Hugh Esco

    07/07/2022, 11:33 PM
    in that file I see this:
    Copy code
    {
                # Allow the CA CLI to access the certificate_status endpoint
                match-request: {
                    path: "/puppet-ca/v1/certificate_status"
                    type: path
                    method: [get, put, delete]
                }
                allow: {
                   extensions: {
                       pp_cli_auth: "true"
                   }
                }
                sort-order: 500
                name: "puppetlabs cert status"
            },
    I only sign certificates from localhost for the puppetserver / certificate authority. How should that be configured to allow me to do the deed?
  • n

    natemccurdy

    07/08/2022, 12:23 AM
    The
    pp_cli_auth
    default allow rule was added in Puppetserver 6 as a default, and all new installs of a Puppetserver at version 6+ will generate that extension by default. How is your container’s cert generated? Maybe it’s an old one from before Puppet 6? Either way, your two options are: 1) Add the certname of your CA Puppetserver to that allow list, replacing the existing value. Like
    allow: <certname_here>
    2) Add the extension to your puppetserver’s cert with something like this: https://github.com/smortex/puppet-add-cli-auth-to-certificate
  • s

    Slackbot

    07/08/2022, 8:34 AM
    This message was deleted.
    t
    c
    • 3
    • 2
  • s

    Slackbot

    07/08/2022, 1:03 PM
    This message was deleted.
    a
    • 2
    • 3
  • a

    Allahshukur Ahmadzada

    07/08/2022, 1:05 PM
    Hello Anyone call explain below things, preferable with example.
  • a

    Allahshukur Ahmadzada

    07/08/2022, 3:26 PM
    noone can?
1...919293...428Latest