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

    Allahshukur Ahmadzada

    06/28/2022, 3:39 PM
    well 3 config files I prefer them to be open
  • l

    Lumiere

    06/28/2022, 3:39 PM
    oh, it's only 3 files?
  • l

    Lumiere

    06/28/2022, 3:40 PM
    generally, I recommend being explicit about the list of files to configure
  • l

    Lumiere

    06/28/2022, 3:41 PM
    but you can put all of them into the same class, use a loop or other options to reduce duplication
    đź’Ż 1
  • a

    Allahshukur Ahmadzada

    06/28/2022, 3:44 PM
    well can you be more specific please if you have done it, like I have 3 diffrent file resources which copies files from files dir to same directory, keeping the original name. So merging these three could be useful, right? can you point example doc, blog or share?
  • s

    Slackbot

    06/28/2022, 3:50 PM
    This message was deleted.
    👍 1
    a
    l
    d
    • 4
    • 3
  • a

    Allahshukur Ahmadzada

    06/28/2022, 4:08 PM
    well another question, is it possible to exec command on master and pipe result to file and ship to agent?
  • s

    Slackbot

    06/28/2022, 4:10 PM
    This message was deleted.
    a
    • 2
    • 1
  • n

    natemccurdy

    06/28/2022, 4:20 PM
    What do you mean @Allahshukur Ahmadzada by “the point getting them all at once” exactly? Puppet only ever does one thing at a time, so keep that in mind. Why do they need to be all at once?
  • a

    Allahshukur Ahmadzada

    06/28/2022, 4:20 PM
    to have less code
  • n

    natemccurdy

    06/28/2022, 4:22 PM
    Got it. Then that
    .each
    iterator above is a good way to have fewer lines of code, if that’s your goal.
  • n

    natemccurdy

    06/28/2022, 4:23 PM
    As for the exec question, the answer is no.
    exec
    resources run on the Puppet agent, not the master. So that’s impossible via `exec`’s. What’s your actual goal? What do you need to get from the master to the agent?
  • s

    Slackbot

    06/28/2022, 4:27 PM
    This message was deleted.
    a
    l
    +2
    • 5
    • 61
  • l

    Lumiere

    06/28/2022, 4:34 PM
    so, there are absolutely better options then a .env file via exec, the hiera data lookup system has a vault plugin that will give you the data as variables which you can implement into templates
  • l

    Lumiere

    06/28/2022, 4:34 PM
    or however you need to
  • a

    Allahshukur Ahmadzada

    06/28/2022, 5:02 PM
    message has been deleted
  • s

    Slackbot

    06/28/2022, 5:23 PM
    This message was deleted.
    k
    r
    • 3
    • 2
  • s

    Scott Fenton

    06/28/2022, 5:41 PM
    Anyone have any idea why I can't update code using Code Manager after a PE upgrade 2021.04 -> .06? I'm getting this snippet:
  • s

    Slackbot

    06/28/2022, 5:41 PM
    This message was deleted.
    h
    s
    • 3
    • 6
  • f

    Freddy Spierenburg

    06/28/2022, 7:39 PM
    Nope, it doesn't work if I use
    /metrics/v2
    as the path. For version
    6.16.1
    it returns a
    404 Not Found
    and for version
    6.17.0
    is stalls as well. I'm not using an external Jolokia Java agent, this is simply the lib built-in of the Puppet Server from package: https://yum.puppetlabs.com/puppet6/el/7/x86_64/puppetserver-6.17.0-1.el7.noarch.rpm This reference to
    CVE-2020-7943
    does not really apply I'm afraid. As according to your shared link this was solved in version
    6.11.1
    and the metrics API only starts failing from version
    6.17.0
    onwards.
    6.11.1
    and up to and including version
    6.16.1
    work perfectly. Yes, I tested them all, because due to the release notes of version
    6.12.1
    https://puppet.com/docs/puppet/6/server/release_notes.html#puppet-server-6121 I expected it all to fail at that version, but it didn't. I sincerely expect this to be a bug in handling connections to port 8180 that at the moment do not call accept() when a connection is made. But please forgive me if this is not the right place to ask such a question.
  • b

    Brian Schonecker

    06/28/2022, 7:42 PM
    message has been deleted
  • b

    Brian Schonecker

    06/28/2022, 7:58 PM
    I managed to get it working but I think I may have done something quite dirty. Running 'puppetdb ssl-setup' resulted in the following (sanitized) output: puppetdb ~]# puppetdb ssl-setup PEM files in /etc/puppetlabs/puppetdb/ssl already exists, checking integrity. Warning: /etc/puppetlabs/puppetdb/ssl/private.pem does not match the file used by Puppet (/etc/puppetlabs/puppet/ssl/private_keys/puppetdb.pem) Warning: /etc/puppetlabs/puppetdb/ssl/public.pem does not match the file used by Puppet (/etc/puppetlabs/puppet/ssl/certs/puppetdb.pem) Setting ssl-host in /etc/puppetlabs/puppetdb/conf.d/jetty.ini already correct. Setting ssl-port in /etc/puppetlabs/puppetdb/conf.d/jetty.ini already correct. Setting ssl-key in /etc/puppetlabs/puppetdb/conf.d/jetty.ini already correct. Setting ssl-cert in /etc/puppetlabs/puppetdb/conf.d/jetty.ini already correct. Setting ssl-ca-cert in /etc/puppetlabs/puppetdb/conf.d/jetty.ini already correct. Setting client-auth in /etc/puppetlabs/puppetdb/conf.d/jetty.ini already correct. [root@puppetdb ~]# cd /etc/puppetlabs/puppetdb/ssl [root@puppetdb ssl]# tar -czvf backup.tar.gz * ca.pem private.pem public.pem [root@puppetdb ssl]# cp /etc/puppetlabs/puppet/ssl/private_keys/puppetdb.pem /etc/puppetlabs/puppetdb/ssl/private.pem [root@puppetdb ssl]# cp /etc/puppetlabs/puppet/ssl/certs/puppetdb.pem /etc/puppetlabs/puppetdb/ssl/public.pem [root@puppetdb ssl]# systemctl restart puppetdb
  • b

    Brian Schonecker

    06/28/2022, 8:00 PM
    I managed to get it working but I think I may have done something quite dirty. Running 'puppetdb ssl-setup' resulted in the following (sanitized) output: puppetdb ~]# puppetdb ssl-setup PEM files in /etc/puppetlabs/puppetdb/ssl already exists, checking integrity. Warning: /etc/puppetlabs/puppetdb/ssl/private.pem does not match the file used by Puppet (/etc/puppetlabs/puppet/ssl/private_keys/puppetdb.pem) Warning: /etc/puppetlabs/puppetdb/ssl/public.pem does not match the file used by Puppet (/etc/puppetlabs/puppet/ssl/certs/puppetdb.pem) Setting ssl-host in /etc/puppetlabs/puppetdb/conf.d/jetty.ini already correct. Setting ssl-port in /etc/puppetlabs/puppetdb/conf.d/jetty.ini already correct. Setting ssl-key in /etc/puppetlabs/puppetdb/conf.d/jetty.ini already correct. Setting ssl-cert in /etc/puppetlabs/puppetdb/conf.d/jetty.ini already correct. Setting ssl-ca-cert in /etc/puppetlabs/puppetdb/conf.d/jetty.ini already correct. Setting client-auth in /etc/puppetlabs/puppetdb/conf.d/jetty.ini already correct. So I copied the certificates from /etc/puppetlabs/puppet/ssl to /etc/puppetlabs/puppetdb/ssl: [root@puppetdb ssl]# cp /etc/puppetlabs/puppet/ssl/private_keys/puppetdb.pem /etc/puppetlabs/puppetdb/ssl/private.pem [root@puppetdb ssl]# cp /etc/puppetlabs/puppet/ssl/certs/puppetdb.pem /etc/puppetlabs/puppetdb/ssl/public.pem [root@puppetdb ssl]# systemctl restart puppetdb Then when I ran Puppet on my master server, the certificate errors went away. I'm sure what I did here isn't something I should have done but that did fix the problem. I'm confused as to why I have 'two sets of certs' on the server and why copying the /etc/puppetlabs/puppet/ssl certs fixed my problem on the puppet master. In addition, the puppet master was indeed updating PuppetDB whenever a client checked in so something was working...
  • d

    Dr Bunsen Honeydew

    06/28/2022, 9:45 PM
    beaker 🧑‍🏫 Bolt is about to start up in #CFD8Z9A4T
  • s

    Slackbot

    06/29/2022, 7:15 AM
    This message was deleted.
    t
    s
    • 3
    • 2
  • f

    Freddy Spierenburg

    06/29/2022, 8:31 AM
    message has been deleted
  • s

    sameer

    06/29/2022, 10:10 AM
    Hello members!!! I would like to define a package in script using case $lsbdistcodename. I already have in the script to install python3-pymodbus to latest but my operating system debian 9 doesn't have the latest package. It works only for python 2.7. when i run the puppet it throws error that unable to locate package. Could not update: Execution of '/usr/bin/apt-get -q -y -o DPkg:Options:=--force-confold install python3-pymodbus' returned 100: Reading package lists... Building dependency tree... Reading state information... E: Unable to locate package python3-pymodbus
  • s

    sameer

    06/29/2022, 10:11 AM
    Hello members!!! I would like to define a package in puppet script using case $lsbdistcodename. I already have in the script to install python3-pymodbus to latest but my operating system debian 9 doesn't have the latest package. It works only for python 2.7. when i run the puppet it throws error that unable to locate package. Could not update: Execution of '/usr/bin/apt-get -q -y -o DPkg:Options:=--force-confold install python3-pymodbus' returned 100: Reading package lists... Building dependency tree... Reading state information... E: Unable to locate package python3-pymodbus
  • s

    sameer

    06/29/2022, 10:13 AM
    Hello members!!! I would like to define a package in puppet script using case $lsbdistcodename. I already have in the script to install python3-pymodbus to latest but my operating system debian 9 doesn't have the latest package. It works only for python 2.7. when i run the puppet it throws error that unable to locate package. Could not update: Execution of '/usr/bin/apt-get -q -y -o DPkg:Options:=--force-confold install python3-pymodbus' returned 100: Reading package lists... Building dependency tree... Reading state information... E: Unable to locate package python3-pymodbus ---------------any leads on this?
  • s

    sameer

    06/29/2022, 10:51 AM
    Hello members!!! I would like to define a package in puppet script using case $lsbdistcodename. I already have in the script to install python3-pymodbus to latest but my operating system debian 9 doesn't have the latest package. It works only for python 2.7. when i run the puppet it throws error that unable to locate package. Could not update: Execution of '/usr/bin/apt-get -q -y -o DPkg:Options:=--force-confold install python3-pymodbus' returned 100: Reading package lists... Building dependency tree... Reading state information... E: Unable to locate package python3-pymodbus ---------------any leads on this?
1...828384...428Latest