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

Support meta information on service #441

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions manifests/service.pp
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
$service_name = $title,
$tags = [],
$token = undef,
$meta = {},
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please add a datatype to this?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure I get you? Its a {} that per definition is a Hash? Just like the $tags are a array?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the default datatype is Hash in this case, but users could provide every other datatype as well. You can prefix the parameter with an explicit datatype, to enforce it. That would be:

Hash $meta = {},

) {
include consul

Expand All @@ -62,6 +63,8 @@
'tags' => $tags,
'checks' => $checks,
'token' => $token,
'meta' => $meta,

$override_key => $enable_tag_override,
}

Expand Down