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

    josh

    01/31/2023, 4:56 PM
    @bastelfreak @vchepkov in puppet 7.x, the
    include_legacy_facts
    controls whether the agent sends legacy facts to the server, but they are still available for type/provider confines/suitability. I see @smortex submitted a PR for fqdn_rand, which we'll need to update in 7.x. In Puppet 8, we're going to switch all of puppet's type/providers to using structured facts, so that we can finally cut the cord on legacy facts.
    gratitude thank you 1
  • b

    bastelfreak

    01/31/2023, 4:56 PM
    ahhhh ok
  • b

    Brian Schonecker

    01/31/2023, 5:37 PM
    Good 13:34 EST. I'm trying to add "Managed by Puppet. Do not edit" to this define but I'm having trouble appending a single "managed by puppet line" with concat/concat::fragment. The tnsnames.pp define manages a single file so it could get called multiple times for multiple entries in the same file. I've looked at other modules' concat::fragment for a clue on how to make this happen but so far I've been unsuccessful. What would be a good way to have "managed by puppet" at the beginning of the file without having it repeated every time the define is instantiated?
  • b

    Brian Schonecker

    01/31/2023, 5:37 PM
    Good 13:34 EST. I'm trying to add "Managed by Puppet. Do not edit" to this define but I'm having trouble appending a single "managed by puppet line" with concat/concat::fragment. The tnsnames.pp define manages a single file so it could get called multiple times for multiple entries in the same file. I've looked at other modules' concat::fragment for a clue on how to make this happen but so far I've been unsuccessful. What would be a good way to have "managed by puppet" at the beginning of the file without having it repeated every time the define is instantiated?
  • b

    Brian Schonecker

    01/31/2023, 5:38 PM
    So far, all of examples I've looked at for concat::fragment create multiple, separate files instead of a single file with multiple entries.
  • n

    natemccurdy

    01/31/2023, 5:39 PM
    You need to use a concat::fragment with a lower number
    order
    than the rest of the fragments.
  • b

    Brian Schonecker

    01/31/2023, 5:39 PM
    Yes, but won't I have a duplicate definition?
  • n

    natemccurdy

    01/31/2023, 5:39 PM
    And put that in a class that's shared by all declarations of that define type.
  • b

    Brian Schonecker

    01/31/2023, 5:40 PM
    Unfortunately, there is no class that declares tnsnames.pp. I'll see about how to do that.
  • n

    natemccurdy

    01/31/2023, 5:40 PM
    e.g. in the define, add
    include oradb::tsnames::header
    Then create that new class called
    oradb::tsnames::header
    that contains just a single concat::fragment
  • n

    natemccurdy

    01/31/2023, 5:40 PM
    e.g. in the define, add
    include oradb::tsnames::header
    Then create that new class called
    oradb::tsnames::header
    that contains just a single concat::fragment
  • n

    natemccurdy

    01/31/2023, 5:41 PM
    Not a class that declares tsnames.pp, but a class that is declared by tsnames.pp
  • b

    Brian Schonecker

    01/31/2023, 5:41 PM
    Won't that create a duplicate resource definition?
  • n

    natemccurdy

    01/31/2023, 5:41 PM
    No. Since Puppet only ever declares classes once regardless of how many times you
    include <some_class>
  • n

    natemccurdy

    01/31/2023, 5:42 PM
    No. Since Puppet only ever declares classes once regardless of how many times you
    include <some_class>
  • b

    Brian Schonecker

    01/31/2023, 5:42 PM
    Ahhh....I see that. Let me give that a try. Thank you.
  • d

    Dr Bunsen Honeydew

    01/31/2023, 5:45 PM
    letsplay 🧑‍🏫Puppet Core Team is about to start up in #CFD8Z9A4T
  • b

    Brian Schonecker

    01/31/2023, 6:29 PM
    @natemccurdy something like this?
  • n

    natemccurdy

    01/31/2023, 6:42 PM
    Yup, that looks correct.
  • s

    Slackbot

    01/31/2023, 7:00 PM
    This message was deleted.
    v
    s
    +3
    • 6
    • 37
  • v

    vchepkov

    01/31/2023, 7:03 PM
    I posted my code snippet in one of the threads
  • b

    Brian Schonecker

    01/31/2023, 8:34 PM
    message has been deleted
  • s

    Slackbot

    01/31/2023, 9:19 PM
    This message was deleted.
    n
    j
    +2
    • 5
    • 50
  • n

    natemccurdy

    01/31/2023, 9:40 PM
    So the reason it doesn't install a package in Puppet 4 with the zleslie module is because of this bit of code: 1) There's an
    if
    condition to check of the
    $package_name
    variable is set: https://github.com/voxpupuli/puppet-unbound/blob/1.3.2/manifests/init.pp#L79 2) And for freeBSD, it's set to
    undef
    , which means the package will not be installed: https://github.com/voxpupuli/puppet-unbound/blob/1.3.2/manifests/params.pp#L50
  • n

    natemccurdy

    01/31/2023, 9:44 PM
    So to get similar behavior as the old module, and do what you want of not trying to install the package, you could either: A) Declare the
    unbound
    module with the
    package_name
    parameter set to an empty string. e.g.
    Copy code
    class { 'unbound':
      package_name => '',
    }
    B) Or if you use Hiera, add an environment level piece of Hiera data for
    unbound::package_name
    that is the empty string:
    ''
  • n

    natemccurdy

    01/31/2023, 9:46 PM
    So to get similar behavior as the old module, and do what you want of not trying to install the package, you could either: A) Declare the
    unbound
    module with the
    package_name
    parameter set to an empty string. e.g.
    Copy code
    class { 'unbound':
      package_name => '',
    }
    B) Or if you use Hiera, add an environment level piece of Hiera data for
    unbound::package_name
    that is the empty string:
    ''
    . e.g.
    Copy code
    ---
    # Somewhere in an environment-level Hiera data file.
    unbound::package_name: ''
  • s

    Slackbot

    01/31/2023, 11:19 PM
    This message was deleted.
    n
    j
    +2
    • 5
    • 12
  • r

    ramindk

    02/01/2023, 5:32 AM
    My experience was absolutely broken in PE 2019.x. Lots of memory issues and constant restarts. Support should be able to confirm that it's not recommended
  • b

    blink

    02/01/2023, 9:28 AM
    How to manage facts cache reported to puppetdb ?
    Copy code
    facter -p
    show correct value of custom facts but
    Copy code
    puppet facts
    show old one
    Copy code
    puppetserver version: 7.9.3
    puppet 7.21.0
    puppetdb version: 7.12.0
    facter 4.2.14
    any advise how to manage that ?
  • s

    Slackbot

    02/01/2023, 10:41 AM
    This message was deleted.
    h
    m
    • 3
    • 2
1...291292293...428Latest