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

    Yury Bushmelev

    07/21/2023, 1:35 PM
    yeah
  • v

    VoxBot

    07/21/2023, 1:36 PM
    and now that I think about it, probably why one of the patches I wrote failed tests
  • y

    Yury Bushmelev

    07/21/2023, 1:41 PM
    I’m implementing your suggestions and yes, that simplifies template a lot!
  • v

    VoxBot

    07/21/2023, 1:42 PM
    :)
  • y

    Yury Bushmelev

    07/21/2023, 1:49 PM
    one thing I miss is a function that wraps such cases in a EPP:
    Copy code
    <%- if $field { -%>
      <%= $field %>
    <%- } -%>
  • y

    Yury Bushmelev

    07/21/2023, 1:50 PM
    should be part of Stdlib I’d say.. or maybe we need a
    epplib
    🙂
  • v

    VoxBot

    07/21/2023, 1:51 PM
    on the one hand it makes sense, on the other: very often you have some additional formatting
  • y

    Yury Bushmelev

    07/21/2023, 1:51 PM
    also true..
  • v

    VoxBot

    07/21/2023, 1:51 PM
    like indenting or
    option: $value
  • v

    VoxBot

    07/21/2023, 1:52 PM
    so you can probably write
    <%= if $field { "${field}\n" } -%>
  • y

    Yury Bushmelev

    07/21/2023, 1:52 PM
    then it might be part of EPP, like
    <%?= $field %>
    🙂
  • y

    Yury Bushmelev

    07/21/2023, 1:52 PM
    hm.. I didn’t thought about that.. should work too
  • v

    VoxBot

    07/21/2023, 1:53 PM
    and you can write <%= $field %> and I think undef is an empty char, but then you have line endings
  • y

    Yury Bushmelev

    07/21/2023, 1:53 PM
    need more experiments
  • y

    Yury Bushmelev

    07/21/2023, 4:51 PM
    ewoud: I’m poking Erubis regarding the ERB processing.. mostly because I’m not happy with what ripper and temple can provide
  • y

    Yury Bushmelev

    07/21/2023, 4:51 PM
    though Erubis looks obsolete these days 😞
  • y

    Yury Bushmelev

    07/21/2023, 4:54 PM
    it can load and/or convert any line into some kind of Ruby.. though I’m not sure how big is the effort required to convert it to EPP 🙂
  • y

    Yury Bushmelev

    07/21/2023, 4:54 PM
    looking into this:
    Copy code
    require 'erubis'
    
    x = Erubis::Eruby.load_file("./geo.erb")
    pp x
  • y

    Yury Bushmelev

    07/21/2023, 4:56 PM
    though.. if we can craft something on top of Erubis::Converter.. it might work
  • y

    Yury Bushmelev

    07/21/2023, 5:03 PM
    https://github.com/kwatch/erubis/blob/master/lib/erubis/tiny.rb <- an example 🙂
  • y

    Yury Bushmelev

    07/21/2023, 5:07 PM
    well.. after some googling I found Erubi is recommended these days: https://github.com/jeremyevans/erubi/blob/master/lib/erubi.rb
  • y

    Yury Bushmelev

    07/21/2023, 5:13 PM
    even more crazy idea is to build something on top if Ruby itself: https://github.com/ruby/ruby/blob/master/lib/erb/compiler.rb
  • p

    Pat Riehecky

    07/21/2023, 6:45 PM
    Re: https://github.com/sgnl05/sgnl05-sssd/issues/102#issuecomment-1645381857 I'd be perfectly happy to convert my module over to the modulesync templates and "donate" it to Vox (where I'd stay active maintaining it), but I don't want to start that process until I'm sure nobody's toes are where I'm going to be stomping 😉
  • b

    bastelfreak

    07/21/2023, 6:47 PM
    I think migrating that is fine
  • b

    bastelfreak

    07/21/2023, 6:48 PM
    I think you already have permissions to migrate it
  • p

    Pat Riehecky

    07/21/2023, 6:48 PM
    I should have the rights, I just want to be sure folks are OK with the idea before I start shoving things in the namespace
  • b

    bastelfreak

    07/21/2023, 6:52 PM
    yeah, go one with it 🙂
  • p

    Pat Riehecky

    07/21/2023, 6:54 PM
    Can do, is the a quick trick for converting from PDK to modulesync?
  • b

    bastelfreak

    07/21/2023, 6:54 PM
    migrate the module to us, add the module to https://github.com/voxpupuli/modulesync_config/blob/master/managed_modules.yml and then we run modulesync
  • p

    Pat Riehecky

    07/21/2023, 6:59 PM
    In theory I'm at the part of https://voxpupuli.org/docs/migrate_module/ where an admin checks my work and adds the colaborators to teams with write access
1...558559560...648Latest