The intention is for the the service running state after boot to be optionally handled by puppet. Omitting the ensure parameter does this, but why can't I add it when I need it like this? service { "$my_module::params::myServiceName": if $::my_service_ensure_running != 'undef' { ensure => "$my_module::my_service_ensure_running", } enable => 'true', require => [ Package["$oscar_legacy::params::mysqlPackageName"], File["/etc/mysql/conf.d/mysqld_oscar_dbs.cnf"] ], }
puppet parser validate {} complains as so: Error: Could not parse for environment production: Syntax error at '::my_service_ensure_running'; expected '}' at /home/oscara/git/puppetmaster/modules/my_module/manifests/init.pp:154 -- You received this message because you are subscribed to the Google Groups "Puppet Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-dev+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-dev/b45ca3c9-4c81-4daf-8414-57859aac0b20%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.