On Sep 30, 2014, at 2:50 PM, Nicolas lino <[email protected]> wrote:

> Hello and sorry for my English.
> 
> I have my first module but I have a prblem:
> 
> My manifest:
> #
> #
> #
> class nginx {
>   $nginx_conf = '/etc/nginx/conf.d'
> 
>   service { 'nginx':
>     ensure     => running,
>     enable     => true,
>     hasrestart => true,
>     require    => File['/etc/nginx/nginx.conf'],
>     restart    => '/etc/init.d/nginx reload'
>   }
> 
>   file { '/etc/nginx/nginx.conf':
>     ensure  => latest,
>     mode    => '0644',
>     owner   => 'root',
>     group   => 'root',
>     source => "puppet:///modules/nginx/nginx.conf",
>   }            ////////line22

Hi Nicolas,

You cannot use 'latest' for the file resource's ensure parameter. That value 
only applies to package resources. Puppet will always ensure that the file on a 
client matches whatever version of file exists at the path specified in the 
manifest. You should use one of the following values for the ensure parameter: 
file, directory, link, absent. 'present' is also supported, but I encourage you 
to avoid it and be explicit by specifying the type of file. In your case, 
'file' is the correct choice.

--
Peter Bukowinski

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/03CD5EC4-82D9-42C5-ABDE-A8034273AA63%40gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to