I am working on creating a cookbook that will send the chef run status into zabbix with zabbix_sender. When I run knife cookbook upload for my cookbook I am receiving the following syntax error. It appears that it’s telling me that there is an unexpected break, but I can’t figure out what is wrong with my code below. Any help would be greatly appreciated.
syntax error, unexpected ‘\n’, expecting :: or ‘[’ or ‘.’
1 #!/usr/bin/ruby
2 chef_gem 'zabbix_sender’
3
4 require 'zabbix_sender’
5
6 module
7 class RunStatus < Chef::Handler
8 def zabbix
9 sender = ZabbixSender.new(zabbix_host: ‘’, port: 10051)
10 if success?
11 sender.post(‘host’, ‘key’, ‘1’)
12 else
13 if failed?
14 sender.post(‘host’, ‘key’, ‘0’)
15 end
16 end
17 end
18 end
19