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

    runejuhl

    10/04/2022, 9:32 AM
    I just tested this in the
    puppet/puppet-agent-ubuntu
    Docker image with
    moreutils
    installed and the following oneliner:
    Copy code
    ( puppet apply -t --debug |& ts -i %.S )  <<EOF
    class main() {
      notify { 'omg': }
    }
    EOF
  • r

    rismoney

    10/04/2022, 12:29 PM
    message has been deleted
  • r

    rismoney

    10/04/2022, 12:36 PM
    think i isolated the slowness down to encoretechnologies/puppet-powershellmodule. it might be due to powershell cmdlet crl checks on non-inet computers, lack of proxy. anyway pulled it out since its largely abandonware. thanks all to everyone who gave me the breadcrumbs
    🙇 1
  • r

    runejuhl

    10/04/2022, 12:46 PM
    The standard output of command is connected via a pipe to the standard
    input of command2. This connection is performed before any redirec‐
    tions specified by the command (see REDIRECTION below). If |& is used,
    command's standard error, in addition to its standard output, is con‐
    nected to command2's standard input through the pipe; it is shorthand
    for 2>&1 |. This implicit redirection of the standard error to the
    standard output is performed after any redirections specified by the
    command.
  • s

    Slackbot

    10/04/2022, 1:02 PM
    This message was deleted.
    m
    r
    r
    • 4
    • 24
  • s

    Slackbot

    10/04/2022, 2:13 PM
    This message was deleted.
    ✅ 1
    r
    • 2
    • 1
  • r

    Ray Burkhart

    10/04/2022, 2:18 PM
    Good morning. I can’t seem to figure out an eyaml problem. On the server, I’ve got my encrypted data and on the puppetserver when I run puppet lookup keystore_pass_enc, it returns the correct lookup. Also when a run puppet apply to the filename, it also works (writes /tmp file with correct data). However, on the agent, when I run puppet agent -t it returns an error decrypting… and permission denied on the private_key.pkcs7.pem file. Trying to figure out why it works manually directly on the server, but when invoked from the agent via puppet agent -t it fails.
  • n

    nandha kumar

    10/04/2022, 3:57 PM
    👋 Hello, team!
  • n

    nandha kumar

    10/04/2022, 3:57 PM
    Hi Team,
  • s

    Slackbot

    10/04/2022, 4:06 PM
    This message was deleted.
    c
    t
    • 3
    • 2
  • n

    nandha kumar

    10/04/2022, 4:06 PM
    Hi Team, I was trying to manage Redhat SCL mariadb ( rh-mariadb105 ) via puppet module ( https://github.com/puppetlabs/puppetlabs-mysql ) and was trying to configure with different options but still cant get it done. Please someone help me on this. Puppetserver: hostname - puppet.mylabserver.com puppetserver version - puppetserver-6.19.0-1.el7.noarch /etc/puppetlabs/code/environments/production/modules/mysql/metadata.json "name": "puppetlabs-mysql", "version": "13.0.0", site.pp: -------- node '9a67a918185c.mylabserver.com' { class { 'mysql::server': package_name => 'rh-mariadb105-mariadb', package_ensure => '10.5.16-2.el7.x86_64', service_name => 'rh-mariadb105-mariadb', service_provider => 'systemd', root_password => 'UNSET', options => { 'mysqld' => { 'datadir' => '/etc/opt/rh/rh-mariadb105/', 'general_log_file' => '/var/log/mariadb/mariadb.log', 'socket' => '/var/run/mariadb/mariadb.sock', 'log-error' => '/var/log/mariadb/mariadb.log', 'pid-file' => '/var/run/mariadb/mariadb.pid', }, } } } Puppet agent: # hostname 9a67a918185c.mylabserver.com # uname -an Linux 9a67a918185c.mylabserver.com 3.10.0-1160.66.1.el7.x86_64 #1 SMP Wed Apr 27 203434 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux # puppet agent -tv Info: Using environment 'production' Info: Retrieving pluginfacts Info: Retrieving plugin Info: Retrieving locales Info: Loading facts Info: Caching catalog for 9a67a918185c.mylabserver.com Info: Applying configuration version '1664899320' Notice: /Stage[main]/Mysql:ServerService/Service[mysqld] Dependency Mysql_datadir[/etc/opt/rh/rh-mariadb105/] has failures: true Warning: /Stage[main]/Mysql:ServerService/Service[mysqld] Skipping because of failed dependencies Warning: /Stage[main]/Mysql:ServerService/Exec[wait for mysql socket to open] Skipping because of failed dependencies Warning: /Stage[main]/Mysql:Server:Root_password/Exec[remove install pass]: Skipping because of failed dependencies Warning: /Stage[main]/Mysql:Server/Anchor[mysqlserverend] Skipping because of failed dependencies Error: Could not find a suitable provider for mysql_datadir Notice: Applied catalog in 0.23 seconds
  • c

    CVQuesty

    10/04/2022, 4:31 PM
    You need to spend some quality time with r10k and Roles & Profiles and control_repo. Having all that in your site.pp will become a completely unmanageable situation
  • t

    tvaughan

    10/04/2022, 4:31 PM
    Try this as an example https://github.com/simp/pupmod-simp-ds389/blob/master/manifests/install.pp
  • c

    CVQuesty

    10/04/2022, 4:33 PM
    Now, as to your question…. I would run
    puppet agent -td
    to get the full scope of what’s going on during your Puppet run. While we can see that something failed, and then it was a requirement for something that wants to run later, we don’t know exactly what the problem is. Can you run it in debug with
    puppet agent -td
    so we can see the exact issue?
  • c

    CVQuesty

    10/04/2022, 4:33 PM
    Now, as to your question…. I would run
    puppet agent -td
    to get the full scope of what’s going on during your Puppet run. While we can see that something failed, and then it was a requirement for something that wants to run later, we don’t know exactly what the problem is. Can you run it in debug with
    puppet agent -td
    so we can see the exact issue?
  • t

    tvaughan

    10/04/2022, 4:37 PM
    message has been deleted
  • h

    hbui

    10/04/2022, 6:31 PM
    the way this is defined, it looks like datadir is managed via puppet, but the parent dir does not exist (i.e. nothing created /etc/opt/rh). I'd guess that it did not install the SCL package that you wanted. If you really want mysql to store its data in /etc (yikes!), then you need to make sure that the system can install
    rh-mariadb105-mariadb
    . But that's just guessing, if you want a better answer, we'd need to see the full debug.
  • r

    rismoney

    10/04/2022, 8:08 PM
    cvquesty, i don't use r10k... i make my site.pp just an include to a sitemodule, then sitemodule has include to every other module. then every other module either applies or doesn't if applicable. can r10k work in a monorepo? I don't use forge repos directly. i clone them, and push to internal repo. then use git submodules. nothing talks to inet.
  • g

    Greg Bristol

    10/04/2022, 8:10 PM
    this is really reminding me of some painful years at a previous company
  • r

    rismoney

    10/04/2022, 8:16 PM
    Greg, I like it actually. It makes for very deterministic configs.
  • b

    bastelfreak

    10/04/2022, 8:19 PM
    you can deploy that with r10k. but it would also allow you to deploy the ither internal/mirrors modules without the pain of submodules
  • n

    natemccurdy

    10/04/2022, 8:28 PM
    I use r10k with a monorepo, and I couldn’t imagine deploying the code any other way. r10k isn’t just for fetching modules from the Forge. It makes it super simple to use a feature-branch workflow to test code in Puppet environments. And simplifies getting your Puppet code onto a fleet of dozens of Puppetserver compilers.
    💯 1
    this 1
    highfive 1
  • n

    natemccurdy

    10/04/2022, 8:28 PM
    I use r10k with a monorepo, and I couldn’t imagine deploying the code any other way. r10k isn’t just for fetching modules from the Forge. It makes it super simple to use a feature-branch workflow to test code in Puppet environments. And simplifies getting your Puppet code onto a fleet of dozens of Puppetserver compilers.
  • g

    Greg Bristol

    10/04/2022, 8:50 PM
    yeah it was just a pain making sure modules were properly installed, etc.
  • g

    Greg Bristol

    10/04/2022, 8:50 PM
    and was very difficult to teach others about, etc.
  • g

    Greg Bristol

    10/04/2022, 8:51 PM
    moving to r10k makes it easy to just point at the r10k docs when people want to know more
  • g

    Greg Bristol

    10/04/2022, 8:51 PM
    but in general i tend to lean towards using community tools that i don't have to document or maintain all by myself
    this 1
  • r

    Robert Vincent

    10/04/2022, 8:57 PM
    Benchmarked the various methods to create a hash of local users on Windows, and this was the most performant option:
    Copy code
    Facter.add(:users) do
      confine kernel: 'windows'
      setcode do
        Hash[
          Puppet::Util::Windows::ADSI::User.map { |u| [u.name, true] }
        ]
      end
    end
  • r

    rismoney

    10/04/2022, 9:21 PM
    I'd be curious to know how to configure it in a monorepo. I use a custom autostager we wrote a decade ago that does the staging of git code, now on a nfs vol consumed by n # of docker containers.
  • w

    William Myers

    10/04/2022, 9:24 PM
    I'm in the process of learning puppet and am fighting what appears to be a cert issue? The master itself works fine but any other systems I try to connect to the master are throwing errors like this once i've stamped their cert. The master's name is "vmpuppetmaster01.britanniahome.net" does the "puppet" cn represent the default hostname?, where can I override it if so?
    Copy code
    Error: /File[/var/cache/puppet/facts.d]: Failed to generate additional resources using 'eval_generate': SSL_connect returned=1 errno=0 state=error: certificate verify failed (unable to get issuer certificate): [unable to get issuer certificate for /CN=Puppet CA: <http://vmpuppetmaster01.britanniahome.net|vmpuppetmaster01.britanniahome.net>]
1...180181182...428Latest