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

    VoxBot

    05/23/2023, 8:32 AM
    you can export the file content as fact and query puppetdb for this fact?
  • v

    VoxBot

    05/23/2023, 8:33 AM
    and can you explain what kind of application this is
  • v

    VoxBot

    05/23/2023, 8:42 AM
    basically the openssl module. if you export a certificate resource and import it on different agents, each agent uses the openssl command to generate a certificate. this of course prevents using the same certificate on multiple agents
  • v

    VoxBot

    05/23/2023, 8:43 AM
    which in turn makes CA management impossible, as there is no real use if every node has a different CA file
  • v

    VoxBot

    05/23/2023, 8:43 AM
    do you want to create a cert once and distribute it to multiple machines?
  • v

    VoxBot

    05/23/2023, 8:43 AM
    or create the CA once?
  • v

    VoxBot

    05/23/2023, 8:45 AM
    create the CA once and distribute it to multiple machines
  • v

    VoxBot

    05/23/2023, 8:45 AM
    so the agents can generate their own client certs and authenticate against each other
  • v

    VoxBot

    05/23/2023, 8:47 AM
    define it on one system, e.g. the puppetserver, export it as fact or file resoure, collect it on all other nodes
  • v

    VoxBot

    05/23/2023, 8:47 AM
    or save it in a directory that's accessible via https and download it from there
  • v

    VoxBot

    05/23/2023, 9:27 AM
    and thats where the provider system of the openssl module falls short
  • v

    VoxBot

    05/23/2023, 9:28 AM
    that's nothing the openssl module should do
  • v

    VoxBot

    05/23/2023, 9:28 AM
    at least the define on one system and collect it on all others doesnt work this way, you get different certs on all machines
  • v

    VoxBot

    05/23/2023, 9:28 AM
    that's just a file resource in your profile to put the CA into the correct place?
  • v

    VoxBot

    05/23/2023, 9:30 AM
    ah you mean the CA cert as a file and just export and import that. maybe i need to clarify what i am trying to do ^^
  • v

    VoxBot

    05/23/2023, 9:31 AM
    i try to define opensslcertificatex509{'CAcert':}; export that and then import it on all nodes i want it on
  • v

    VoxBot

    05/23/2023, 9:32 AM
    and that generates different certs on all nodes; but maybe thats just a problem of the compound nature of the resource
  • v

    VoxBot

    05/23/2023, 9:33 AM
    as I said, don't export that resource. create a fact that reads the CA file
  • v

    VoxBot

    05/23/2023, 9:34 AM
    that will go into puppetdb
  • v

    VoxBot

    05/23/2023, 9:34 AM
    and you can query that fact on other systems
  • v

    VoxBot

    05/23/2023, 9:34 AM
    ohhh, gotcha
  • v

    VoxBot

    05/23/2023, 9:35 AM
    that might work, i will try that
  • v

    voxel

    05/23/2023, 10:47 AM
    @bastelfreak I would have fix for https://github.com/voxpupuli/puppet-check_mk/pull/38 but that would require some major changes to the module.. is it ok to do that in that one PR?
  • v

    VoxBot

    05/23/2023, 10:57 AM
    Can you create a new branch based on the modulesync branch and do the changes there?
  • v

    voxel

    05/23/2023, 11:06 AM
    sure
  • v

    VoxBot

    05/23/2023, 12:44 PM
    https://github.com/voxpupuli/puppet-dnsquery/blob/master/lib/puppet/functions/dnsquery/lookup.rb mhm how do I pass the lambda to the function
  • b

    bastelfreak

    05/23/2023, 12:59 PM
    @b4ldr ^ any idea? 🙂
  • b

    bastelfreak

    05/23/2023, 1:02 PM
    https://www.puppet.com/docs/puppet/7/functions_ruby_signatures.html mentions optional_block_param but not how it's used 😞
  • v

    VoxBot

    05/23/2023, 1:20 PM
    ah lol
  • v

    VoxBot

    05/23/2023, 1:21 PM
    dnsquery::lookup('example.com') || {['127.0.0.1']}
1...485486487...642Latest