fix syntax errors

* change single-line if else assignment to ternary
* change elsif with no comparison to just else

Copied from [opscode ticket](http://tickets.opscode.com/browse/COOK-2462):
>I tried uploading the Nagios cookbook to my chef server but I got the following error:

>FATAL: Erb template templates/default/hosts.cfg.erb has a syntax error:
FATAL: -:25: syntax error, unexpected keyword_elsif, expecting keyword_end
FATAL:   elsif !node['cloud'].nil? && n['cl...
FATAL:        ^
FATAL: -:27: syntax error, unexpected keyword_else, expecting keyword_end