Closed cwjohnston closed 5 years ago
Chef Infra Client, version 15.1.36
sensu_agent 'default' do config( "name": node['hostname'], "namespace": "default", "backend-url": ["wss://192.168.10.102:8081"], "insecure-skip-tls-verify": true, "subscriptions": ["haproxy"], "labels": { "app_id": "app01", "app_tier": "loadbalancer" }, "annotations": { "color": "green" } ) end
--- name: default-centos-7 namespace: default backend-url: - wss://192.168.10.102:8081 insecure-skip-tls-verify: true subscriptions: - haproxy labels: :app_id: app01 :app_tier: loadbalancer annotations: :color: green
Labels and annotations are not configured as expected.
Label and annotation key/value pairs rendered in agent.yml should match the string literals provided in config
config
Label and annotation keys should be rendered in agent.yml with a colon prefixed
Update test/cookbooks/sensu_test/recipes/default.rb to match the sensu_agent resource described in "input" section above
test/cookbooks/sensu_test/recipes/default.rb
Manually run kitchen converge and observe the resulting /etc/sensu/agent.yml
kitchen converge
Chef Version
Chef Infra Client, version 15.1.36
Input
Output
Impact
Labels and annotations are not configured as expected.
Expected Behavior
Label and annotation key/value pairs rendered in agent.yml should match the string literals provided in
config
Actual Behavior
Label and annotation keys should be rendered in agent.yml with a colon prefixed
Steps to Reproduce your problem
Update
test/cookbooks/sensu_test/recipes/default.rb
to match the sensu_agent resource described in "input" section aboveManually run
kitchen converge
and observe the resulting /etc/sensu/agent.yml