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

    Slackbot

    01/06/2023, 3:52 PM
    This message was deleted.
    y
    t
    h
    • 4
    • 11
  • h

    helindbe

    01/06/2023, 4:08 PM
    The tahu puppet language backend reads yaml data but treats entries as puppet language source. It is thus possible to call functions.
  • s

    Slackbot

    01/06/2023, 5:43 PM
    This message was deleted.
    c
    v
    r
    • 4
    • 13
  • s

    Slackbot

    01/06/2023, 5:54 PM
    This message was deleted.
    c
    b
    • 3
    • 5
  • b

    Brian Schonecker

    01/06/2023, 6:05 PM
    I'm having trouble getting (re)connected to my puppetdb/puppetboard server. My Puppet master is a separate server and my puppet DB/puppetboard is a single, separate server. This used to work but I must have screwed up a certificate somewhere in the last day or two in my attempt to get SSL everywhere in my Puppet environment. When I run my manifest, I get, "Notice: Unable to connect to puppetdb server (https://examplev-puppdb-01p.example.com:8081): certificate verify failed [self signed certificate in certificate chain for CN=example-Root]". If I use 'wget' to wget https://examplev-puppdb-01p.example.com:8081, the SSL connection is good. If I use Chrome or Edge to browse to the URL then everything is good with the certificate. I don't quite know where puppetboard is coming up with the intermediate certificate location for my internally-signed certificate for the puppetdb/puppetboard server. The certificate was created against a windows CA server and the fact that wget doesn't complain hints to me that the puppet server is OK with the intermediate certificates but when puppet agent runs on the master, I get the "Unable to connect to puppetdb" errors. I did notice that the private and public keys for the certificate for my Puppet DB server were regenerated yesterday...which is when things got screwed up. I'm using v8.2.0 of puppetboard and again, things were working fine. Running puppet against a previous version of control-repo didn't fix the problem so I'm betting that I did something manually to get Puppetdb/Puppetboard working in the past that I've not automated. I've been working on this for more than an day and I'm out of ideas. Obviously, the issue is certificates but I don't know why the puppetboard "checkin" is failing when wget doesn't fail.
  • s

    Slackbot

    01/06/2023, 6:06 PM
    This message was deleted.
    b
    b
    d
    • 4
    • 74
  • s

    Slackbot

    01/06/2023, 6:10 PM
    This message was deleted.
    a
    n
    v
    • 4
    • 8
  • v

    vchepkov

    01/06/2023, 6:33 PM
    what about this
    Copy code
    run_command("C:/Program\ Files/uninstall.exe",$targets)
  • v

    vchepkov

    01/06/2023, 6:34 PM
    what about this
    Copy code
    run_command("C:/Program\\ Files/uninstall.exe",$targets)
  • n

    natemccurdy

    01/06/2023, 8:55 PM
    Here's an example of what @vchepkov is talking about. Rather than a
    require
    on the
    ruby-augeas
    package. Use a
    before
    on the dependent packages.
  • s

    Slackbot

    01/06/2023, 8:59 PM
    This message was deleted.
    b
    a
    • 3
    • 3
  • n

    natemccurdy

    01/06/2023, 9:01 PM
    From https://www.puppet.com/docs/puppet/6/lang_resources.html#lang_resource_syntax-resource-complete-syntax
    Each resource body consists of:
    • A title, which can be one of:
    ** A string.
    ** An array of strings, which declares multiple resources.
  • n

    natemccurdy

    01/06/2023, 9:01 PM
    From https://www.puppet.com/docs/puppet/6/lang_resources.html#lang_resource_syntax-resource-complete-syntax
    Each resource body consists of:
    • A title, which can be one of:
    ◦ A string.
    ◦ An array of strings, which declares multiple resources.
  • s

    Slackbot

    01/07/2023, 2:55 PM
    This message was deleted.
    a
    c
    • 3
    • 2
  • a

    Animesh Sahu

    01/07/2023, 3:05 PM
    Oh seems like noti*c*e was the function I wanted. That actually runs at catalog compilation instead, doesn't seem to be the thing I
  • a

    Animesh Sahu

    01/07/2023, 3:05 PM
    Oh seems like noti*c*e was the function I wanted. That actually runs at catalog compilation instead, doesn't seem to be the thing I'm looking for.
  • a

    Animesh Sahu

    01/07/2023, 3:06 PM
    Oh seems like noti*c*e(msg) was the function I wanted. That actually runs at catalog compilation instead, doesn't seem to be the thing I'm looking for.
  • c

    cruelsmith

    01/07/2023, 3:07 PM
    Be aware that `noti*c*e`is only logged on the server / compiler.
    notify
    will be a resource displayed on the puppet run but creating a changed resource while doing it. When you just want to print on the agent while puppet run you can use
    echo
    from https://github.com/ipcrm/ipcrm-echo It also supports your wanted `refreshonly`option: https://github.com/ipcrm/ipcrm-echo/blob/master/lib/puppet/type/echo.rb#L26-L29
  • s

    Slackbot

    01/07/2023, 3:29 PM
    This message was deleted.
    c
    a
    c
    • 4
    • 10
  • c

    cruelsmith

    01/07/2023, 3:40 PM
    When you wanted to use a declared resource as data source then i am not aware of a way to doing so. Use your data source that creates the user resource directly or use facter to collect information on the node.
  • a

    Animesh Sahu

    01/07/2023, 3:48 PM
    I'm declaring user like:
    Copy code
    $primary_user = 'animesh'
    user { $primary_user:
      ensure     => present,
      system     => false,
      managehome => true,
      home       => "/home/${primary_user}",
      shell      => '/usr/bin/fish',
      groups     => ['wheel'],
      membership => 'minimum',
      # require    => [Class['packages::fish']],
      password   => file('configs/private/password'),
    }
    Now I'd like to access them under various modules/class
  • s

    Slackbot

    01/07/2023, 5:53 PM
    This message was deleted.
    h
    c
    +2
    • 5
    • 6
  • c

    cruelsmith

    01/07/2023, 5:53 PM
    Is anyone aware of a module that provides functions to receive information from the vSphere REST API or some generic functions for a REST API? Things i found: • puppetlabs/vsphere which just provides a resource for managing a vm • a ruby gem that uses the vSphere SDK https://github.com/ManageIQ/rbvmomi2 • a ruby gem for generic simple rest api calls https://github.com/rest-client/rest-client background aka the goal: I want to receive the host, datacenter and etc. of the vm inside the manifest so i can set a icinga host dependency via icinga/icinga2 or can apply different settings for that node based on that. There exist articles about setting "custom attributes" in the vSphere for the vm that can be read by VMware Toolbox aka vmware guest tools. But this needs special rights to be set and they must be updated per a external scheduled tasks to always match the current host of the vm. Also the vSphere REST API does not support to set / get the "custom attributes" 🤷. That is why it does not suite me in that case.
  • c

    cruelsmith

    01/07/2023, 5:55 PM
    Is anyone aware of a module that provides functions to receive information from the vSphere REST API or some generic functions for a REST API? Things i found: • puppetlabs-vsphere which just provides a resource for managing a vm • a ruby gem that uses the vSphere SDK https://github.com/ManageIQ/rbvmomi2 • a ruby gem for generic simple rest api calls https://github.com/rest-client/rest-client background aka the goal: I want to receive the host, datacenter and etc. of the vm inside the manifest so i can set a icinga host dependency via icinga-icinga2 or can apply different settings for that node based on that. There exist articles about setting "custom attributes" in the vSphere for the vm that can be read by VMware Toolbox aka vmware guest tools. But this needs special rights to be set and they must be updated per a external scheduled tasks to always match the current host of the vm. Also the vSphere REST API does not support to set / get the "custom attributes" 🤷. That is why it does not suite me in that case.
  • c

    cruelsmith

    01/07/2023, 5:56 PM
    Is anyone aware of a module that provides functions to receive information from the vSphere REST API or some generic functions for a REST API? Things i found: • puppetlabs-vsphere which just provides a resource for managing a vm • a ruby gem that uses the vSphere SDK https://github.com/ManageIQ/rbvmomi2 • a ruby gem for generic simple rest api calls https://github.com/rest-client/rest-client background aka the goal: I want to receive the host, datacenter and etc. of the vm inside the manifest so i can set a icinga host dependency via icinga-icinga2 or can apply different settings for that node based on that. There exist articles about setting "custom attributes" in the vSphere for the vm that can be read by VMware Toolbox aka vmware guest tools. But this needs special rights to be set and they must be updated per a external scheduled tasks to always match the current host of the vm. Also the vSphere REST API does not support to set / get the "custom attributes" 🤷. That is why it does not suite me in that case.
  • c

    cruelsmith

    01/07/2023, 11:14 PM
    yeah was aware that i can writing my own fact for that one. But since you need credentials to access the vsphere i find it not a good solution since the they need to be saveed on the agent to use them to pool the vsphere fact. Something like puppet-ldapquery or the puppetdb function just for the vsphere would be preferd on my side.
  • c

    cruelsmith

    01/07/2023, 11:19 PM
    yeah was aware that i can writing my own fact for that one. But since you need credentials to access the vsphere i find it not a good solution since they need to be saved on the agent to use them to pool the vsphere fact. Something like puppet-ldapquery or the puppetdb function just for the vsphere would be preferd on my side.
  • d

    David Sandilands

    01/08/2023, 12:18 AM
    so what may be of interest in this area is https://www.puppet.com/docs/patterns-and-tactics/latest/integration/integration-with-external-data-providers.html and https://github.com/puppetlabs/puppet-data-service
  • a

    Adam Kendall

    01/08/2023, 9:12 PM
    @Adam Kendall has left the channel
  • s

    Slackbot

    01/09/2023, 1:33 AM
    This message was deleted.
    j
    c
    • 3
    • 4
1...261262263...428Latest