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
file { $nginx_conf:
ensure => directory,
mode => '0644',
owner => 'root',
group => 'root',
}
}
Directory structure:
[root@v702uprod manifests]# tree /etc/puppet/modules/
/etc/puppet/modules/
├── API
└── nginx
├── files
│ └── nginx.conf
├── manifests
│ └── init.pp
└── templates
The problem:
Error: Failed to apply catalog: Validation of File[/etc/nginx/nginx.conf]
failed: You cannot specify more than one of content, source, target at
/etc/puppet/m
odules/nginx/manifests/init.pp:22
Wrapped exception:
You cannot specify more than one of content, source, target
someone comes up with the problem???
--
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/b00b2b24-25a9-485c-a8c4-ddddfc12740c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.