Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A need for the local_root vsftpd.conf option in class vsftpd #6

Closed
d-ph opened this issue Oct 13, 2013 · 2 comments
Closed

A need for the local_root vsftpd.conf option in class vsftpd #6

d-ph opened this issue Oct 13, 2013 · 2 comments

Comments

@d-ph
Copy link

d-ph commented Oct 13, 2013

Hey mate,

thanks for making this puppet module, but let's get straight to the point:

I miss local_root vsftpd.conf option in your class vsftpd. I've managed to add it by appending

  $local_root              = undef

to your class vsftpd in \modules\vsftpd\manifests\init.pp, and by appending

<% if @local_root -%>
local_root=<%= @local_root %>
<% end -%>

to file \modules\vsftpd\templates\vsftpd.conf.erb. After that I could use

class { 'vsftpd':
  # (...)
  local_root        => '/var/www',
}

in my /manifests/default.pp.

But if you ask me, the problem doesn't really lies in the fact, that "oh boy, I need option ABC, but it's not there". I think the problem lies in the way, you're trying to manage the options. Simply speaking, I would store such "highly mutable" data in a hash map, rather than trying to manage it by hand. Can you see how awful it is to add a new option? I needed to edit two different places to add just one option. And there's still more. I like the way puphpet::ini handles the problem (by an array):

puphpet::ini { 'xdebug':
  value   => [
    'xdebug.default_enable = 1',
    'xdebug.remote_autostart = 0',
    'xdebug.remote_connect_back = 1',
    'xdebug.remote_enable = 1',
    'xdebug.remote_handler = "dbgp"',
    'xdebug.remote_port = 9000',
    'xdebug.max_nesting_level = 250'
  ],
  ini     => '/etc/php5/apache2/conf.d/zzz_xdebug.ini',
  notify  => Service['apache'],
  require => Class['php'],
}

This way they covered all the xdebug options existing now and in the future.

I'm far from telling you how to code. At least I'm trying not to. In fact I don't even know how to program in Ruby, so you're my hero from the beginning. Just think about it, especially because your puppet module is #1 in the download count ("ftp" query) on the puppet forge, so more users may also have similar problem.

Or maybe there is a different way to add an arbitrary option to the vsftpd.conf through thias/puppet-vsftpd?

Kthxbb

@thias
Copy link
Owner

thias commented Oct 14, 2013

Very good point. This module was created a while back, and my goal was to have the default create something identical to the original Red Hat Enterprise Linux configuration file, hence the configuration directives as class parameters in order to output them in very specific places of the template.

I've made changes in 5bfc135 which should suit your use case. I'll release 0.2.0 to the forge after a few more minor changes and some extra testing.

@thias thias closed this as completed Oct 14, 2013
@d-ph
Copy link
Author

d-ph commented Oct 14, 2013

Thanks mate, you're the best. I'll buy you a bottle of vodka if I ever met you in person. Great job.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants