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

    tutelacool

    08/24/2022, 1:03 PM
    yeah … I tried.. let me do again
  • t

    tutelacool

    08/24/2022, 1:03 PM
    ahhh
  • v

    vchepkov

    08/24/2022, 1:05 PM
    This will cure it
    Copy code
    class foo (
      $test = $foo::params::test,
    ) inherits foo::params {
    👍🏻 1
  • s

    Slackbot

    08/24/2022, 1:07 PM
    This message was deleted.
    t
    • 2
    • 1
  • t

    tutelacool

    08/24/2022, 1:07 PM
    it’s working now ! thank you @vchepkov !
    👍 1
  • t

    tutelacool

    08/24/2022, 1:08 PM
    it’s working now ! thank you @vchepkov !
  • s

    Slackbot

    08/24/2022, 1:10 PM
    This message was deleted.
    y
    r
    r
    • 4
    • 8
  • a

    Alberto R

    08/24/2022, 1:13 PM
    Hello guys Is there any problem with the 2FA email? We are trying to log in but the email code is not sent.
  • h

    HimTiw

    08/24/2022, 1:59 PM
    👋 Hello, team!
  • h

    HimTiw

    08/24/2022, 2:29 PM
    I have one basic query, Can we import ruby classes in custom fact to leverage them for code output for example am trying to test whether a port is open or closed and based on the result i want that value to be populated as fact . This fact value i want to use in my modules for further conditional processing. Here is the code snippet for the same.
  • h

    HimTiw

    08/24/2022, 2:30 PM
    # nxlog_state.rb require socket def nxlog_port_open?(ip, port) begin s = Socket.tcp(ip, port, connect_timeout: 5) s.close return true rescue return false end end # function call Facter.add(:nxlog_connection) do confine osfamily: 'windows' setcode do if nxlog_port_open?(param1, param2) 'open' else 'blocked' end end end
  • h

    HimTiw

    08/24/2022, 2:30 PM
    but this doesnt seems to work when triggering facter
  • b

    binford2k

    08/24/2022, 3:14 PM
    is this all one file? If so, the require and the method code should be inlined inside the
    setcode
    block
  • s

    Slackbot

    08/24/2022, 3:14 PM
    This message was deleted.
    h
    • 2
    • 1
  • n

    natemccurdy

    08/24/2022, 3:38 PM
    Facts can’t take parameters for input. So yeah +1 to Ben’s question about param1 and param2
  • n

    natemccurdy

    08/24/2022, 3:38 PM
    Facts can’t take parameters for input. So yeah +1 to Ben’s question about param1 and param2
  • h

    hbui

    08/24/2022, 4:05 PM
    generally the fact would be about the system you are on (not a remote system), so it would be trying to look at a local listener and not reaching off machine. On Linux, I'd probably use the output of
    ss
    or
    lsof
    to determine if something was listening on the machine. I'm guessing there's an equivalent powershell commandlet that would do it on windows. It almost looks like you want a fact on machine x to determine if a service on system y is allowing connections. If both are puppet managed, I'd expect machine y to have a fact and then use puppetdb_query in the puppet code for machine x to use it to make decisions. If machine y is not puppet managed, it's obviously more complicated.
  • n

    natemccurdy

    08/24/2022, 4:11 PM
    I think this is related to this other post from puppet-dev: https://puppetcommunity.slack.com/archives/C0W1X7ZAL/p1661194100814879
  • n

    natemccurdy

    08/24/2022, 4:12 PM
    Trying to test connectivity to a remote system/check if a remote system’s port is open? If so….. why? What’s the real use case here? That’s kind of …. odd. At least odd to do with puppet.
  • s

    Slackbot

    08/24/2022, 4:13 PM
    This message was deleted.
    h
    • 2
    • 1
  • h

    hbui

    08/24/2022, 5:50 PM
    and now I have two more channels to follow 😏
  • l

    Lumiere

    08/24/2022, 6:01 PM
    does anyone know if there's a way in puppetdb to check for expiring certs (for puppet 4/6)
  • n

    natemccurdy

    08/24/2022, 6:02 PM
    There’s nothing built-in that captures a cert’s expiration time into PuppetDB. But you could, in theory, write a custom fact that shows a host’s cert expiration, then you could query for that fact out of PuppetDB.
  • l

    Lumiere

    08/24/2022, 6:03 PM
    welp I guess I know what I am doing today
  • s

    Slackbot

    08/24/2022, 6:04 PM
    This message was deleted.
    l
    y
    • 3
    • 4
  • v

    vchepkov

    08/24/2022, 6:04 PM
    I guess forgot to do TODO 🙂
  • l

    Lumiere

    08/24/2022, 6:04 PM
    @vchepkov ++
    👍 1
  • d

    Dr Bunsen Honeydew

    08/24/2022, 6:04 PM
    vchepkov leveled up! (Karma: 10)
    😀 1
  • l

    Lakshman teja

    08/24/2022, 6:23 PM
    Hi team please help me on how to create a custom tasks with shell script in PE i am created two file file.sh, file.json in the path /etc/puppetlabs/code/environments/production/modules/tasks but those are not showing the web console Thank you
  • h

    hbui

    08/24/2022, 6:39 PM
    You might try the bolt channel and the bolt documentation. https://puppet.com/docs/pe/2021.2/tasks_in_pe.html https://puppet.com/docs/bolt/latest/bolt.html
1...142143144...428Latest