[Puppet Users] rspec-puppet require syntax

2013-09-17 Thread Guy Knights
Can someone tell me the correct way to specify the following require statement in an rspec-puppet test? *require => [Class['ssl'],Class['pcre3'],Staging::Extract["nginx-${version}.tar.gz"]]* I tried this: *'require' => "[Class['ssl'],Class['pcre3'],Staging::Extract['nginx-1.4.1.tar.gz']]"* but

Re: [Puppet Users] rspec-puppet require syntax

2013-09-19 Thread Dan Bode
I'm pretty sure the error is b/c the class names need to be capitalized. On Tue, Sep 17, 2013 at 10:05 AM, Guy Knights wrote: > Can someone tell me the correct way to specify the following require > statement in an rspec-puppet test? > > *require => > [Class['ssl'],Class['pcre3'],Staging::Extra

Re: [Puppet Users] rspec-puppet require syntax

2013-09-20 Thread Guy Knights
No such luck. I all the above suggestions (capitalising class names, removing inner quotes) with another require: * file { 'set_nginx_dir_permissions':* *ensure => directory,* *path=> "/opt/nginx-${version}",* *owner => nginx,* *group => nginx,* *mode=> '0644',*

Re: [Puppet Users] rspec-puppet require syntax

2013-10-02 Thread Johan De Wit
When 'require' multiple resources, you should copy what the catalog contains : * 'require' => '[User[nginx]{:name=>"nginx"}, Exec[install_nginx]{:command=>"install_nginx"}]', in the rspec file. Thats the only way i could make it pass the test. Grts jo * On Saturday, 21 September 2013 01:

Re: [Puppet Users] rspec-puppet require syntax

2013-12-18 Thread Mikhail Simin
This syntax works for me: 'require' => [ 'User[nginx]', 'Exec[install_nginx]'] On Wednesday, October 2, 2013 4:45:01 AM UTC-7, Johan De Wit wrote: > > When 'require' multiple resources, you should copy what the catalog > contains : > > > > > > > > > * 'require' => '[User[nginx]{:name

Re: [Puppet Users] rspec-puppet require syntax

2013-12-19 Thread Gavin Williams
Yeh, the quoting of the resource is key I found... Need to quote the entire resource, rather than the resource title... Gav On Thursday, 19 December 2013 00:45:11 UTC, Mikhail Simin wrote: > > This syntax works for me: > > 'require' => [ > 'User[nginx]', > 'Exec[install_nginx]'] > > O