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

    Les Shiner

    01/11/2023, 12:41 AM
    starting the service and then running the command nets me
    Copy code
    Fatal error when running action 'generate'
      Error: Failed connecting to <https://puppet:8140/puppet-ca/v1/certificate_request/>
      Root cause: SSL_connect returned=1 errno=0 state=error: certificate verify failed (unable to get local issuer certificate)
  • n

    natemccurdy

    01/11/2023, 12:41 AM
    Which goal from that table do you need?
  • n

    natemccurdy

    01/11/2023, 12:41 AM
    Which goal from that table do you need?
  • l

    Les Shiner

    01/11/2023, 12:41 AM
    all of this works as root, but not as user
  • n

    natemccurdy

    01/11/2023, 12:42 AM
    Yeah, that's expected.
  • n

    natemccurdy

    01/11/2023, 12:42 AM
    Is there reason you need to run as non-root?
  • l

    Les Shiner

    01/11/2023, 12:42 AM
    Regenerate the agent certificate of your Puppet primary server and add DNS alt-names or other certificates
  • l

    Les Shiner

    01/11/2023, 12:42 AM
    i thought it was best practice to do this non root?
  • l

    Les Shiner

    01/11/2023, 12:42 AM
    i've set this all up as root and it's incredibly easy
  • l

    Les Shiner

    01/11/2023, 12:42 AM
    but now i'm working on non root
  • l

    Les Shiner

    01/11/2023, 12:43 AM
    should i just.. stay as root? (I mean.. i will... don't get me wrong, i would love to)
  • n

    natemccurdy

    01/11/2023, 12:45 AM
    Puppetserver generally runs as a non-root user, but that's not the same thing as generating a new cert with alt names. At the very least, you definitely can't do this as an arbitrary non-root user and would need to run this as the same user the puppetserver service runs as. But it's simpler to just use
    sudo
    any time you need to run a
    puppetserer ca
    command.
  • n

    natemccurdy

    01/11/2023, 12:46 AM
    Also, don't forget that
    --ca-client
    flag in step 4.
  • l

    Les Shiner

    01/11/2023, 12:46 AM
    shit
  • l

    Les Shiner

    01/11/2023, 12:46 AM
    that last flag was literally it
  • l

    Les Shiner

    01/11/2023, 12:47 AM
    i can't believe i didn't scroll over and see that
  • l

    Les Shiner

    01/11/2023, 12:47 AM
    thank you @natemccurdy, I really appreciate you
  • l

    Les Shiner

    01/11/2023, 12:47 AM
    dammit
  • l

    Les Shiner

    01/11/2023, 12:47 AM
    whole day today
    🍻 1
  • l

    Les Shiner

    01/11/2023, 12:47 AM
    lol
  • n

    natemccurdy

    01/11/2023, 1:38 AM
    Yup. I'd go that route as well. But not everyone has a well manicured environment where everything on every node is Puppet managed, unfortunately.
  • n

    natemccurdy

    01/11/2023, 1:38 AM
    Copy code
    resources { 'yumrepo':
      purge => true,
    }
  • s

    Slackbot

    01/11/2023, 3:06 PM
    This message was deleted.
    b
    b
    +4
    • 7
    • 25
  • b

    Brian Schonecker

    01/11/2023, 7:27 PM
    I'm having trouble formatting my company's private key when using eyaml. Since the public key doesn't need to be encrypted, the yaml information is parsed properly and all of the indentation and formatting on my public key file is correct. When using eyaml to encrypt the private key, the formatting get screwed up and everything gets indented too far (actually, any indentation is too much) and openssl doesn't parse the private key properly. Here is an example of the eyaml I'm using. I'm pretty sure that the DEC(1)::PKCS7[ stuff is what's causing the indentation. Any idea on what the correct eyaml syntax is so that the information is not indented in my resulting private key file?
  • n

    natemccurdy

    01/11/2023, 7:29 PM
    Is that the literal contents of your Hiera data yaml file, exactly as written in your source code? Other than the bogus private key contents, of course.
  • n

    natemccurdy

    01/11/2023, 7:29 PM
    Is that the literal contents of your Hiera data yaml file, exactly as written in your source code? Other than the bogus private key contents, of course.
  • b

    Brian Schonecker

    01/11/2023, 7:32 PM
    yes.
  • n

    natemccurdy

    01/11/2023, 7:32 PM
    Oh, that's the decrypted file. Like from
    eyaml edit <file>
    ?
  • n

    natemccurdy

    01/11/2023, 7:32 PM
    The problem is that you're missing the
    >
    or
    |
    character after the yaml key's name.
  • b

    Brian Schonecker

    01/11/2023, 7:32 PM
    yeah. There's a "|" that I forgot in there.
1...266267268...428Latest