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

    Yury Bushmelev

    06/22/2022, 10:09 AM
    CA shouldn't be a problem as it is needed just once when fresh server is provisioned.. not much traffic there and can retry multiple times
  • s

    Simon Karberg

    06/22/2022, 1:36 PM
    hey everyone, we have a node running ubuntu 20.04 with puppet 7.17.0. it also has docker 20.10.17 installed through
    puppetlabs-docker
    module v4.4.0. we have around 40 containers defined like this:
    Copy code
    $port = 8098
      $service = 'emailquality'
      $version = 'latest'
      $host_id = hiera('xxxx::host::id', '')
    
      docker::image { 'registry.':
        ensure    => 'latest',
        image_tag => $version,
      }
    
      docker::run { 'emailquality':
        image         => "registry.:${version}",
        ports         => [ "${port}:8585" ],
        memory_limit  => '4g',
        env           => [
          'REDIS_HOST=redis',
          'REDIS_PORT=7009',
          'CASS_CONTACTPOINTS=cassandra',
          'CASS_KEYSPACE=shared',
          "HOST_ID=${host_id}"
        ],
        pull_on_start => true,
      }
    With this setup, we see puppet downloading the newest image from our registry with
    docker::image
    but we can't get
    docker::run
    to "restart" and use the newest image there is. "before" we had
    notify => Service['docker-name']
    on our
    docker::image
    resource. But that made all of our containers go in a restart loop every 5 min (when puppet apply is triggered). My question is, what is the intended method of running and updating the containers ?
  • d

    Dr Bunsen Honeydew

    06/22/2022, 1:36 PM
    See the
    puppetlabs-docker
    module at https://forge.puppet.com/puppetlabs/docker?src=slack&channel=puppet
  • n

    nwops

    06/22/2022, 3:48 PM
    How can I get debug messages in a puppet native function to output to the puppetserver log files? debug = true didn’t work.
  • n

    natemccurdy

    06/22/2022, 3:50 PM
    A puppet-language function? Use
    debug('foo')
  • n

    nwops

    06/22/2022, 3:53 PM
    oops not native but ruby
  • n

    nwops

    06/22/2022, 3:53 PM
    call_function('debug', "Cache not used for #{cache_file}")
  • n

    natemccurdy

    06/22/2022, 3:54 PM
    No need to invoke a Puppet function, there’s a ruby method to use:
    Copy code
    Puppet.debug('foo')
  • n

    nwops

    06/22/2022, 3:55 PM
    @helindbe said I should use call_function. But I agree otherwise
  • n

    natemccurdy

    06/22/2022, 3:56 PM
    Ah, can’t say I’ve ever used call_function in that way, but I suppose it should work. I’ve always just used
    Puppet.debug()
    ,
    Puppet.notice()
    , etc…
  • n

    nwops

    06/22/2022, 3:59 PM
    but how do I tell the puppetserver to dump debug logs?
  • n

    natemccurdy

    06/22/2022, 4:03 PM
    Oh… right. That’s not on by default. Hmm…
  • n

    natemccurdy

    06/22/2022, 4:09 PM
    that’s done in logback.xml: https://puppet.com/docs/puppet/7/server/config_file_logbackxml.html#settings Though… I don’t recommend running with debug logging enabled for very long.
  • n

    nwops

    06/22/2022, 4:40 PM
    https://puppet.com/docs/puppet/7/external_facts.html#external_facts-structured-data-facts I am using an external facts file in json format ie. facts.d/data.json. Some of the facts in the data.json collide with facter’s core facts like hostname, fqdn, ipaddress. How does facter handle this. I assume core facts take precedence?
  • s

    Slackbot

    06/22/2022, 5:10 PM
    This message was deleted.
    n
    e
    +2
    • 5
    • 13
  • n

    natemccurdy

    06/22/2022, 5:16 PM
    A good place to find examples of type aliases is in the stdlib module. Here’s one for IP addresses: https://github.com/puppetlabs/puppetlabs-stdlib/blob/main/types/ip/address.pp
  • d

    devops07

    06/22/2022, 9:10 PM
    Hello, when we create a user in puppet, does it get updated on both
    /etc/password'
    and
    /etc/shadow
    files?
  • l

    Lumiere

    06/22/2022, 9:11 PM
    when you create a user with the user resource, it uses the systems useradd functionality to add the user / manage the user
  • l

    Lumiere

    06/22/2022, 9:11 PM
    so yes, it should update passwd and shadow
  • d

    devops07

    06/22/2022, 9:14 PM
    Thanks @Lumiere . I am using eyaml to encrypt the password. But it is hashing only in password not in shadow
  • y

    Yorokobi

    06/22/2022, 9:15 PM
    message has been deleted
  • l

    Lumiere

    06/22/2022, 9:15 PM
    can you share your user resource?
  • l

    Lumiere

    06/22/2022, 9:15 PM
    (redact values if needed)
  • l

    Lumiere

    06/22/2022, 9:32 PM
    that should work properly, depending on os... I would think /etc/passwd has no password at all and /etc/shadow has a hashed copy of the password
  • d

    devops07

    06/22/2022, 9:35 PM
    okay, Thanks
  • s

    Slackbot

    06/23/2022, 10:47 AM
    This message was deleted.
    c
    a
    n
    • 4
    • 6
  • a

    AngeloMileto

    06/23/2022, 10:50 AM
    Details: Server - enterprise 2019.8.0 Client 6.22.1 OS: RHEL-8 Put selinux in permissive mode on client. Other clients on this server working fine so must be on this host. Getting an error on the client saying it is not able to backup /etc/chrony.conf on server with the most useful Error 500 🙂 I can see the conversation on the puppet server but the module fails because it can't backup the changed file. What log should I look in for more details? I've looked at that pxp-agent log on the client but nothing other than INFO messages and can't seem to find anything on the puppet server. I did a grep --recursive in /var/log/puppetlabs/* for chrony.conf and found the return showing the error message but not a reason why. Any suggestions would be appreciated.
  • a

    AngeloMileto

    06/23/2022, 10:50 AM
    message has been deleted
  • a

    Allahshukur Ahmadzada

    06/23/2022, 12:19 PM
    all questions in Puppet exam are multiple choice? (https://puppet.com/learning-training/certification/exam-details/)
  • s

    sh6624gsj8

    06/23/2022, 1:43 PM
    Hey Puppet beginner here, I want puppet to refresh the yum metadata, when any of the underlying repos are changed or how can I ensure that yum cache is updated if there is a change on a repo . What is the best way to do it? I had declared something like :-
    Copy code
    exec { 'yum-clean-expire-cache':
        command     => '/usr/bin/yum clean expire-cache',
        refreshonly => true,
      }
    but I am not sure how it will work - Alternate way is to refresh when a resource of type Yum is changed - but not sure how I could do that . Any advices? Thanks !
1...777879...428Latest