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
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
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',*
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:
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
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