0

Trying to set a custom subscription to get remediator.rb working in the sensu module in puppet.

class sensuJenkinsMasterClient {
  class { 'sensu': 
     purge_config       => true,
     rabbitmq_password  => '',
     rabbitmq_host      => 'sensu-master',
     #Need fqdn for remediator to work
     subscriptions      => ['sensu-default', 'centosJenkinsMaster', '"${::fqdn}'], 
     use_embedded_ruby  => true, #set under /etc/default/sensu
  }
}
user2363318
  • 361
  • 1
  • 3
  • 11
  • You put that in single quotes which prevents variable expansion. Have you tried `"${::fqdn}"`? – faker Apr 28 '15 at 20:51
  • Agreed, you have some strange quoting going on. Remove the single quotes around the double quotes around fqdn. – Bill Weiss Apr 28 '15 at 20:54

1 Answers1

5

Single quotes prevent variables from getting expanded, so it should be like this:

     subscriptions      => [ 'sensu-default', 'centosJenkinsMaster', $::fqdn, ], 

I'd recommend you to use puppet-lint.
In that case it would have told you:

ERROR: single quoted string containing a variable found on line X
faker
  • 17,496
  • 2
  • 60
  • 70