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

    Yury Bushmelev

    02/12/2023, 4:19 AM
    Drop 2 files in its directory and done
  • n

    Nathan Ward

    02/12/2023, 5:20 AM
    ah, with
    systemd::network
    ?
  • n

    Nathan Ward

    02/12/2023, 5:23 AM
    I've since created an internal version of example42-network, but, I think moving to systemd-networkd is probably the right longer term plan..
  • d

    Dr Bunsen Honeydew

    02/12/2023, 5:23 AM
    See the
    example42-network
    module at https://forge.puppet.com/example42/network?src=slack&channel=puppet
  • n

    Nathan Ward

    02/12/2023, 5:23 AM
    This bot really needs an update heh
  • b

    bastelfreak

    02/12/2023, 8:16 AM
    I highly recommend systemd-networkd which you can manage with our systemd module :)
  • b

    bastelfreak

    02/12/2023, 8:17 AM
    maybe we can add a type and provider in the future
  • c

    canihavethisone

    02/12/2023, 11:49 AM
    I created a class and template to manage networkd and sent an early draft to @bastelfreak. It's by no means a complete module and i think it would never circumvent a need to understand what needs to go in config for a working solution, but it does validate all possible params and settings. @bastelfreak let me know if you want my final copy.
  • c

    canihavethisone

    02/12/2023, 11:49 AM
    I created a class and template to manage networkd and sent an early draft to @bastelfreak. It's by no means a complete module and i think it would never circumvent a need to understand what needs to go in config for a working solution, but it does validate all possible params and settings. @bastelfreak let me know if you want my final copy.
  • b

    bastelfreak

    02/12/2023, 11:51 AM
    if you can provide that as a PR that would be awesome
  • b

    bastelfreak

    02/12/2023, 11:52 AM
    if you can provide that as a PR that would be awesome
  • c

    canihavethisone

    02/12/2023, 11:55 AM
    I'll have a go, it may be somewhat raw though 😜
  • m

    Massimiliano (Max)

    02/12/2023, 1:48 PM
    can you upload your pip package on any webserver ? It's fairly easy to setup. 1. the directory in the the webserver must be browsable 2. under the root directory, you have directory names, which have the same name of the package name that they contain 3. inside each directory you place your corresponding pip package. For instance, you'll have something like the following:
    Copy code
    /my_package/my_package-0.5.tar.gz
  • v

    vchepkov

    02/12/2023, 4:00 PM
    unfortunately, systemd-networkd is not part of standard RHEL and enabling EPEL is not always an option. We do NetworkManager config, but only during provisioning
  • d

    Denys Kyrii

    02/12/2023, 4:30 PM
    Hi all. Does local puppet apply support eyaml backend? I want to be able apply my main module from the control repository locally with puppet apply. I installed all the required gems but during the run I receive.
    Copy code
    Debug: Could not find library 'hiera/backend/eyaml/parser/parser' required to enable feature 'hiera_eyaml'
    Error: Evaluation Error: Error while evaluating a Function Call, Function Load Error for function 'eyaml_lookup_key': Lookup using eyaml lookup_key function is only supported when the hiera_eyaml library is present (file: /home/dkyrii/Documents/r10k/environments/v2_dkyrii/manifests/0first.pp, line: 28, column: 3) on node dkyrii-oel8.home
    Installed gems:
    Copy code
    [dkyrii@dkyrii-oel8 v2_dkyrii]$ /opt/puppetlabs/puppet/bin/gem list
    
    *** LOCAL GEMS ***
    
    activesupport (7.0.4.2)
    addressable (2.8.1)
    aws-eventstream (1.2.0)
    aws-sigv4 (1.5.2)
    benchmark (default: 0.1.0)
    bigdecimal (default: 2.0.0)
    bundler (default: 2.1.4)
    cgi (default: 0.1.0.2)
    citrus (3.0.2)
    concurrent-ruby (1.2.0, 1.1.9)
    csv (default: 3.1.2)
    date (default: 3.0.3)
    debouncer (0.2.2)
    declarative (0.0.20)
    deep_merge (1.2.2)
    deepsort (0.4.5)
    delegate (default: 0.1.0)
    did_you_mean (default: 1.4.0)
    domain_name (0.5.20190701)
    elasticsearch (7.17.7)
    elasticsearch-api (7.17.7)
    elasticsearch-transport (7.17.7)
    etc (default: 1.1.0)
    facter (4.3.0)
    faraday (1.10.3)
    faraday-em_http (1.0.0)
    faraday-em_synchrony (1.0.0)
    faraday-excon (1.1.0)
    faraday-httpclient (1.0.1)
    faraday-multipart (1.0.4)
    faraday-net_http (1.0.1)
    faraday-net_http_persistent (1.2.0)
    faraday-patron (1.0.0)
    faraday-rack (1.0.0)
    faraday-retry (1.0.3)
    fast_gettext (1.1.2)
    fcntl (default: 1.0.0)
    ffi (1.15.5)
    fiddle (default: 1.0.0)
    fileutils (default: 1.4.1)
    forwardable (default: 1.3.1)
    gems (1.2.0)
    getoptlong (default: 0.1.0)
    gettext (3.2.2)
    google-api-client (0.53.0)
    google-apis-core (0.11.0)
    google-apis-discovery_v1 (0.13.0)
    google-apis-generator (0.11.1)
    googleauth (1.3.0)
    hiera (3.12.0)
    hiera-eyaml (3.3.0)
    highline (2.0.3)
    hocon (1.3.1)
    http-accept (1.7.0)
    http-cookie (1.0.5)
    httpclient (2.8.3)
    i18n (1.12.0)
    io-console (default: 0.5.6)
    ipaddr (default: 1.2.2)
    irb (default: 1.2.6)
    json (2.6.3, default: 2.3.0)
    jwt (2.7.0)
    locale (2.1.3)
    logger (default: 1.4.2)
    matrix (default: 0.2.0)
    memoist (0.16.2)
    micro-optparse (1.2.1)
    mime-types (3.4.1)
    mime-types-data (3.2022.0105)
    mini_mime (1.1.2)
    minitest (5.13.0)
    multi_json (1.15.0)
    multipart-post (2.3.0)
    mutex_m (default: 0.1.0)
    net-pop (default: 0.1.0)
    net-smtp (default: 0.1.0)
    net-ssh (4.2.0)
    net-telnet (0.2.0)
    netrc (0.11.0)
    oauth (0.5.10)
    observer (default: 0.1.0)
    open3 (default: 0.1.0)
    openssl (default: 2.1.4)
    optimist (3.0.1)
    os (1.1.4)
    ostruct (default: 0.2.0)
    parslet (2.0.0)
    power_assert (1.1.7)
    prime (default: 0.1.1)
    pstore (default: 0.1.0)
    psych (default: 3.1.0)
    public_suffix (5.0.1)
    puppet (7.23.0)
    puppet-resource_api (1.8.16)
    racc (default: 1.4.16)
    rake (13.0.1)
    rdoc (default: 6.2.1.1)
    readline (default: 0.0.2)
    readline-ext (default: 0.1.0)
    reline (default: 0.1.5)
    representable (3.2.0)
    rest-client (2.1.0)
    retriable (3.1.2)
    rexml (3.2.5, default: 3.2.3.1)
    rss (default: 0.2.8)
    ruby2_keywords (0.0.5)
    scanf (1.0.0)
    sdbm (default: 1.0.0)
    semantic_puppet (1.0.4)
    signet (0.17.0)
    singleton (default: 0.1.0)
    slack-notifier (2.4.0)
    stringio (default: 0.1.0)
    strscan (default: 1.0.3)
    sys-filesystem (1.4.1)
    test-unit (3.3.4)
    text (1.3.1)
    thor (1.2.1, 1.1.0)
    timeout (default: 0.1.0)
    toml (0.3.0)
    toml-rb (2.2.0)
    tracer (default: 0.1.0)
    trailblazer-option (0.1.2)
    tzinfo (2.0.6)
    uber (0.1.0)
    unf (0.1.4)
    unf_ext (0.0.8.2)
    uri (default: 0.10.0)
    vault (0.17.0)
    webrick (1.8.1, default: 1.6.1)
    xmlrpc (0.3.0)
    yaml (default: 0.1.0)
    zlib (default: 1.1.0)
  • d

    Denys Kyrii

    02/12/2023, 4:35 PM
    Hi all. Does local puppet apply support eyaml backend? I want to be able apply my main module from the control repository locally with puppet apply. I installed all the required gems but during the run I receive.
    Copy code
    Debug: Could not find library 'hiera/backend/eyaml/parser/parser' required to enable feature 'hiera_eyaml'
    Error: Evaluation Error: Error while evaluating a Function Call, Function Load Error for function 'eyaml_lookup_key': Lookup using eyaml lookup_key function is only supported when the hiera_eyaml library is present (file: /home/dkyrii/Documents/r10k/environments/v2_dkyrii/manifests/0first.pp, line: 28, column: 3) on node dkyrii-oel8.home
    Installed gems:
    Copy code
    [dkyrii@dkyrii-oel8 v2_dkyrii]$ /opt/puppetlabs/puppet/bin/gem list
    
    *** LOCAL GEMS ***
    
    activesupport (7.0.4.2)
    addressable (2.8.1)
    aws-eventstream (1.2.0)
    aws-sigv4 (1.5.2)
    benchmark (default: 0.1.0)
    bigdecimal (default: 2.0.0)
    bundler (default: 2.1.4)
    cgi (default: 0.1.0.2)
    citrus (3.0.2)
    concurrent-ruby (1.2.0, 1.1.9)
    csv (default: 3.1.2)
    date (default: 3.0.3)
    debouncer (0.2.2)
    declarative (0.0.20)
    deep_merge (1.2.2)
    deepsort (0.4.5)
    delegate (default: 0.1.0)
    did_you_mean (default: 1.4.0)
    domain_name (0.5.20190701)
    elasticsearch (7.17.7)
    elasticsearch-api (7.17.7)
    elasticsearch-transport (7.17.7)
    etc (default: 1.1.0)
    facter (4.3.0)
    faraday (1.10.3)
    faraday-em_http (1.0.0)
    faraday-em_synchrony (1.0.0)
    faraday-excon (1.1.0)
    faraday-httpclient (1.0.1)
    faraday-multipart (1.0.4)
    faraday-net_http (1.0.1)
    faraday-net_http_persistent (1.2.0)
    faraday-patron (1.0.0)
    faraday-rack (1.0.0)
    faraday-retry (1.0.3)
    fast_gettext (1.1.2)
    fcntl (default: 1.0.0)
    ffi (1.15.5)
    fiddle (default: 1.0.0)
    fileutils (default: 1.4.1)
    forwardable (default: 1.3.1)
    gems (1.2.0)
    getoptlong (default: 0.1.0)
    gettext (3.2.2)
    google-api-client (0.53.0)
    google-apis-core (0.11.0)
    google-apis-discovery_v1 (0.13.0)
    google-apis-generator (0.11.1)
    googleauth (1.3.0)
    hiera (3.12.0)
    hiera-eyaml (3.3.0)
    highline (2.0.3)
    hocon (1.3.1)
    http-accept (1.7.0)
    http-cookie (1.0.5)
    httpclient (2.8.3)
    i18n (1.12.0)
    io-console (default: 0.5.6)
    ipaddr (default: 1.2.2)
    irb (default: 1.2.6)
    json (2.6.3, default: 2.3.0)
    jwt (2.7.0)
    locale (2.1.3)
    logger (default: 1.4.2)
    matrix (default: 0.2.0)
    memoist (0.16.2)
    micro-optparse (1.2.1)
    mime-types (3.4.1)
    mime-types-data (3.2022.0105)
    mini_mime (1.1.2)
    minitest (5.13.0)
    multi_json (1.15.0)
    multipart-post (2.3.0)
    mutex_m (default: 0.1.0)
    net-pop (default: 0.1.0)
    net-smtp (default: 0.1.0)
    net-ssh (4.2.0)
    net-telnet (0.2.0)
    netrc (0.11.0)
    oauth (0.5.10)
    observer (default: 0.1.0)
    open3 (default: 0.1.0)
    openssl (default: 2.1.4)
    optimist (3.0.1)
    os (1.1.4)
    ostruct (default: 0.2.0)
    parslet (2.0.0)
    power_assert (1.1.7)
    prime (default: 0.1.1)
    pstore (default: 0.1.0)
    psych (default: 3.1.0)
    public_suffix (5.0.1)
    puppet (7.23.0)
    puppet-resource_api (1.8.16)
    racc (default: 1.4.16)
    rake (13.0.1)
    rdoc (default: 6.2.1.1)
    readline (default: 0.0.2)
    readline-ext (default: 0.1.0)
    reline (default: 0.1.5)
    representable (3.2.0)
    rest-client (2.1.0)
    retriable (3.1.2)
    rexml (3.2.5, default: 3.2.3.1)
    rss (default: 0.2.8)
    ruby2_keywords (0.0.5)
    scanf (1.0.0)
    sdbm (default: 1.0.0)
    semantic_puppet (1.0.4)
    signet (0.17.0)
    singleton (default: 0.1.0)
    slack-notifier (2.4.0)
    stringio (default: 0.1.0)
    strscan (default: 1.0.3)
    sys-filesystem (1.4.1)
    test-unit (3.3.4)
    text (1.3.1)
    thor (1.2.1, 1.1.0)
    timeout (default: 0.1.0)
    toml (0.3.0)
    toml-rb (2.2.0)
    tracer (default: 0.1.0)
    trailblazer-option (0.1.2)
    tzinfo (2.0.6)
    uber (0.1.0)
    unf (0.1.4)
    unf_ext (0.0.8.2)
    uri (default: 0.10.0)
    vault (0.17.0)
    webrick (1.8.1, default: 1.6.1)
    xmlrpc (0.3.0)
    yaml (default: 0.1.0)
    zlib (default: 1.1.0)
  • v

    vchepkov

    02/12/2023, 4:53 PM
    since you run under unprivileged account, you need to setup your hiera configuration
  • v

    vchepkov

    02/12/2023, 4:53 PM
    Copy code
    $ cat ~/.puppetlabs/etc/puppet/hiera.yaml 
    version: 5
    
    defaults:
      datadir: /Users/vchepkov1/data
    
    hierarchy:
      - name: "Secrets"
        lookup_key: eyaml_lookup_key
        options:
          pkcs7_private_key: /Users/vchepkov1/.puppetlabs/bolt/keys/private_key.pkcs7.pem
          pkcs7_public_key: /Users/vchepkov1/.puppetlabs/bolt/keys/public_key.pkcs7.pem
        paths:
          - "common.eyaml"
  • v

    vchepkov

    02/12/2023, 4:54 PM
    Copy code
    $ cat /Users/vchepkov1/data/common.eyaml 
    foo: >
      ENC[PKCS7,MIIBeQYJKoZIhvcNAQcDoIIBajCCAWYCAQAxggEhMIIBHQIBAD
      AFMAACAQEwDQYJKoZIhvcNAQEBBQAEggEAuvdZcrtkHmf/a+NqgweaDjpBRR
      IcrZ0XYmxsS+1OWf2h5XcVnpt1D5MOnAAAW+lLNPSy8W8CgUA+h50xaaJpQN
      hGgQFKkD1CC5LFEIgBB3hAxqnr9k/lyOMznMfmcSfWEItyRldoOj8XTaB/Y9
      P/5dBZ4ZdXTv9bRElzvyV9AgSqsRY8HXb/9H7ZQ3u+J5ytXMjXhbHE5vj2UL
      fG7BlmtqG3u1Ckkk7HfQ5g7blxys2Qj6Q9d+GVTuLq6JXFmeOLfmSeFc1+5Z
      zGxgD3tjTIHNKyyCyd7SpPIze0Z6uizWnG+OKzg9ieTRwswbRrPWH0lzRt6v
      SthL64WFmTZADeYDA8BgkqhkiG9w0BBwEwHQYJYIZIAWUDBAEqBBBziUeuR2
      Ynu60Ds9itkRq7gBDDiNeK/0nEhC0S/jYhoV2u]
  • v

    vchepkov

    02/12/2023, 4:54 PM
    Copy code
    $ puppet apply -e "notice(lookup('foo'))"
    Notice: Scope(Class[main]): hello there
  • d

    Denys Kyrii

    02/12/2023, 4:54 PM
    My command looks like.
    Copy code
    sudo -E puppet apply --environment=v2_dkyrii --test --noop --write-catalog-summary \
    --hiera_config=/home/dkyrii/Documents/r10k/environments/v2_dkyrii/hiera.yaml \
    --modulepath=/home/dkyrii/Documents/r10k/environments/v2_dkyrii/modules:/home/dkyrii/Documents/r10k/environments/v2_dkyrii/site \
    -d manifests/
  • d

    Denys Kyrii

    02/12/2023, 4:57 PM
    Unavailable backend.
    Copy code
    - name: "Secret data: ssl certs, mail secrets"
      lookup_key: eyaml_lookup_key
      paths:
        - "secrets/mysql_secrets.eyaml"
        - "secrets/accounts_sshkeys.eyaml"
        - "secrets/gpg_keys.eyaml"
        - "secrets/ssl_certs.eyaml"
        - "secrets/mail_secrets.eyaml"
        - "secrets/common.eyaml"
      options:
        pkcs7_private_key: /etc/puppetlabs/puppet/keys/private_key.pkcs7.pem
        pkcs7_public_key:  /etc/puppetlabs/puppet/keys/public_key.pkcs7.pem
  • d

    Denys Kyrii

    02/12/2023, 4:58 PM
    It seems like my settings are the same 🙂
  • v

    vchepkov

    02/12/2023, 4:58 PM
    what version of puppet? works for me
  • d

    Denys Kyrii

    02/12/2023, 4:58 PM
    Copy code
    rpm -qa | grep puppet
    puppet-agent-7.23.0-1.el8.x86_64
  • d

    Denys Kyrii

    02/12/2023, 4:58 PM
    fresh install
  • d

    Denys Kyrii

    02/12/2023, 4:59 PM
    Library is present. I have no idea why puppet can't find it.
    🤷‍♂️ 1
  • d

    Denys Kyrii

    02/12/2023, 5:07 PM
    Tried the same as root, moved to /etc/puppetlabs/code/environments. Result is the same.
  • v

    vchepkov

    02/12/2023, 5:08 PM
    maybe some environment is in a way. what if you run without
    -E
1...305306307...428Latest