Guy Knights
2014-Feb-21 18:05 UTC
[Puppet Users] Using same script for multiple services fails
I'd like to use the same init script (via upstart) for multiple service definitions, and I thought that if I gave them different titles but the same name paramter (eg. script name) it should allow that. However, I get a duplicated definition error. eg. * service { "gamedeploy-backend":* * name => 'gamedeploy',* * ensure => running,* * provider => upstart,* * start => "/sbin/initctl start gamedeploy GAME=${game_deploy['title']} COMPONENT=backend ENVIRONMENT=${::environment} DELAY=${game_deploy['delay']}",* * stop => '/sbin/initctl stop gamedeploy COMPONENT=backend',* * status => '/sbin/initctl status gamedeploy COMPONENT=backend',* * hasrestart => false,* * subscribe => [File['gamedeploy_init_script'],File['gamedeploy_script']],* * require => [File['/var/log/deploy'],Account['deployment']],* * }* * service { "gamedeploy-frontend":* * name => 'gamedeploy',* * ensure => running,* * provider => upstart,* * start => "/sbin/initctl start gamedeploy GAME=${game_deploy['title']} COMPONENT=frontend ENVIRONMENT=${::environment} DELAY=${game_deploy['delay']}",* * stop => '/sbin/initctl stop gamedeploy COMPONENT=frontend',* * status => '/sbin/initctl status gamedeploy COMPONENT=frontend',* * hasrestart => false,* * subscribe => [File['gamedeploy_init_script'],File['gamedeploy_script']],* * require => [File['/var/log/deploy'],Account['deployment']],* * }* Is there any way I can get this to work in Puppet, or will I have to create multiple copies of the same script with different filenames? Thanks, Guy <guy@eastsidegamestudio.com> -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/CA%2BgQdWCGp40w4iGDcaSvR8rEFw0c%2BTuO86z8ULe18W7iazGdhg%40mail.gmail.com. For more options, visit https://groups.google.com/groups/opt_out.