Hello,

I'm trying to learn how to use augeas in puppet.  One of the packages we 
have puppet installing is vsftpd.  Rather than putting the vsftpd conf file 
in puppet (in case the config file is updated by the upstream maintainers) 
I'd like to use augeas to make sure the correct lines exist in the config 
file.

Currently, the default vsftpd config file contains the following 21 lines 
(among others of course):

anonymous_enable=YES
#chroot_local_user=YES

I'd like to change this to:

anonymous_enable=NO
chroot_local_user=YES

I have the following in a module:

  #vsftpd
  package { 'vsftpd':
    ensure => installed,
  }

  file { '/etc/vsftpd/vsftpd.conf':
    ensure  => file,
    mode    => 600,
    require => Package['vsftpd'],
  }

  augeas { 'vsftpd.conf':
    context => '/etc/vsftpd/vsftpd.conf',
    changes => [ 'set anonymous_enable=NO', 'set chroot_local_user=YES', ],
    require => File['/etc/vsftpd/vsftpd.conf'],
  }

But I'm having no luck changing either line.

Any suggestions are welcome - thanks!

Greg

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to