Skip to content

Commit

Permalink
Merge pull request #467 from jarro2783/master
Browse files Browse the repository at this point in the history
Don't write out meta parameter when unset
  • Loading branch information
bastelfreak committed Feb 4, 2019
2 parents 51d2fbe + e9af0fe commit f181170
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 13 deletions.
22 changes: 11 additions & 11 deletions manifests/service.pp
Original file line number Diff line number Diff line change
Expand Up @@ -61,17 +61,17 @@
# }
#
define consul::service(
$address = undef,
$checks = [],
$enable_tag_override = false,
$ensure = present,
$id = $title,
$port = undef,
$service_name = $title,
Hash $service_config_hash = {},
$tags = [],
$token = undef,
Hash[String[1], String[1]] $meta = {},
$address = undef,
$checks = [],
$enable_tag_override = false,
$ensure = present,
$id = $title,
$port = undef,
$service_name = $title,
Hash $service_config_hash = {},
$tags = [],
$token = undef,
Optional[Hash[String[1], String[1]]] $meta = undef,
) {

include consul
Expand Down
2 changes: 0 additions & 2 deletions spec/defines/consul_service_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
it {
should contain_file("/etc/consul/service_my_service.json") \
.with_content(/"service" *: *\{/) \
.with_content(/"meta" *: *\{\}/) \
.with_content(/"id" *: *"my_service"/) \
.with_content(/"name" *: *"my_service"/) \
.with_content(/"enable_tag_override" *: *false/)
Expand All @@ -28,7 +27,6 @@
it {
should contain_file("/etc/consul/service_my_service.json") \
.with_content(/"service" *: *\{/) \
.with_content(/"meta" *: *\{\}/) \
.with_content(/"id" *: *"my_service"/) \
.with_content(/"name" *: *"my_service"/) \
.with_content(/"enable_tag_override" *: *false/)
Expand Down

0 comments on commit f181170

Please sign in to comment.