Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trouble writing lua in puppet dsl #1

Open
giganteous opened this issue Jun 21, 2019 · 3 comments
Open

Trouble writing lua in puppet dsl #1

giganteous opened this issue Jun 21, 2019 · 3 comments

Comments

@giganteous
Copy link
Contributor

Hi,

Thanks for writing this module! appreciated.

I don't know if this is the right place to address this, but the current "config" key for a hindsight plugin takes a ruby / puppet style configuration, and I'd like to express the native lua programs in native lua (using a "source" key or "content" + template()), as I'm now fighting the puppet DSL parser to get the following lua on the destination side, preferably with LUA style comments:

filename = "heka_tcp.lua"
instruction_limit = 0
address = "0.0.0.0"

ssl_params = {
  mode = "server",
  protocol = "tlsv1", -- example comment
  key = "/path/to/ssl/server-key.pem",
  certificate = "/path/to/ssl/server.pem",
  cafile = "/path/to/ssl/ca.pem",
  verify = {"peer", "fail_if_no_peer_cert"},
  options = {"all", "no_sslv3"}
}

Especially the verify and options arguments in the ssl_params are not supported by the current version.

I haven't looked at if the current architecture can support such a change, but would you accept such a change to the plugin?

thanks

@deric
Copy link
Owner

deric commented Jun 21, 2019

Hi, I'm glad that you like it.
PRs are always welcomed :)

Supporting config

verify = {"peer", "fail_if_no_peer_cert"},

shouldn't be hard. Have a look at hindsight_escape function. The DSL is sort of initial draft, it's still a bit cumbersome.

@giganteous
Copy link
Contributor Author

I suppose you can close this issue when you're releasing the next version.

There was something nasty: We have this thing running on an old debian wheezy server (yeah, that is oldoldoldstable, predates stretch and jessie), and Concat gives a weird error when I use it with a 'source' argument: ticket in puppetlabs.

I'm new to the concat module, so I'm curious: Is there somewhere documentation on what that module solves? I'm having a hard time understanding its need.

@deric
Copy link
Owner

deric commented Jul 11, 2019

Concat "simply" joins file fragments into a single (text) file. Have a look on their github repo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants