Hi Folks,

I have a doubt about call classes multiple times, i write a module to 
manage FTP users, but i can create only one user, because when i call the a 
second time i receive a error about duplicate instance

My Module

define vsftpd::manager (
    $user,
    $docroot = '/var/www',
    $conf = '/etc/vsftpd',
){
    include vsftpd
    user { "$user":
         ensure => present,
         shell => "/bin/false",
         home => "${docroot}/${user}",
         gid => 480,
  }

 file { "${conf}/user_list":
         ensure => present,
 }
 file_line { 'ftp_user':
         line => $user,
         path => "${conf}/user_list",
 }
}

node.pp

node 'puppetclient' {
      vsftpd::manager{'teste':
      user => 'teste',
 }
}

Error: Could not retrieve catalog from remote server: Error 400 on SERVER: 
Duplicate declaration: File[/etc/vsftpd/user_list] is already declared in 
file 
/etc/puppet/environments/production/modules/vsftpd/manifests/manager.pp:16; 

Somebody can help me?

-- 
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/52f20342-3278-449c-b3c2-b6aa31d1ebba%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to