Browse Source

initial release

pull/1/head
Saz 14 years ago
commit
7c77a722a7
  1. 8
      Modulefile
  2. 3
      README
  3. 22
      files/README.markdown
  4. 1
      files/debian/AltLog
  5. 1
      files/debian/ChrootEveryone
  6. 1
      files/debian/DontResolve
  7. 1
      files/debian/MaxClientsNumber
  8. 1
      files/debian/MinUID
  9. 1
      files/debian/NoAnonymous
  10. 1
      files/debian/PAMAuthentication
  11. 1
      files/debian/PureDB
  12. 1
      files/debian/UnixAuthentication
  13. 1
      files/debian/VerboseLog
  14. 23
      manifests/config.pp
  15. 16
      manifests/init.pp
  16. 5
      manifests/install.pp
  17. 22
      manifests/params.pp
  18. 9
      manifests/service.pp
  19. 12
      metadata.json
  20. BIN
      pkg/saz-pureftpd-0.0.1.tar.gz
  21. 8
      pkg/saz-pureftpd-0.0.1/Modulefile
  22. 3
      pkg/saz-pureftpd-0.0.1/README
  23. 22
      pkg/saz-pureftpd-0.0.1/files/README.markdown
  24. 1
      pkg/saz-pureftpd-0.0.1/files/debian/AltLog
  25. 1
      pkg/saz-pureftpd-0.0.1/files/debian/ChrootEveryone
  26. 1
      pkg/saz-pureftpd-0.0.1/files/debian/DontResolve
  27. 1
      pkg/saz-pureftpd-0.0.1/files/debian/MaxClientsNumber
  28. 1
      pkg/saz-pureftpd-0.0.1/files/debian/MinUID
  29. 1
      pkg/saz-pureftpd-0.0.1/files/debian/NoAnonymous
  30. 1
      pkg/saz-pureftpd-0.0.1/files/debian/PAMAuthentication
  31. 1
      pkg/saz-pureftpd-0.0.1/files/debian/PureDB
  32. 1
      pkg/saz-pureftpd-0.0.1/files/debian/UnixAuthentication
  33. 1
      pkg/saz-pureftpd-0.0.1/files/debian/VerboseLog
  34. 23
      pkg/saz-pureftpd-0.0.1/manifests/config.pp
  35. 16
      pkg/saz-pureftpd-0.0.1/manifests/init.pp
  36. 5
      pkg/saz-pureftpd-0.0.1/manifests/install.pp
  37. 22
      pkg/saz-pureftpd-0.0.1/manifests/params.pp
  38. 9
      pkg/saz-pureftpd-0.0.1/manifests/service.pp
  39. 45
      pkg/saz-pureftpd-0.0.1/metadata.json
  40. 7
      pkg/saz-pureftpd-0.0.1/spec/README.markdown
  41. 6
      pkg/saz-pureftpd-0.0.1/spec/spec.opts
  42. 18
      pkg/saz-pureftpd-0.0.1/spec/spec_helper.rb
  43. 4
      pkg/saz-pureftpd-0.0.1/spec/unit/puppet/provider/README.markdown
  44. 4
      pkg/saz-pureftpd-0.0.1/spec/unit/puppet/type/README.markdown
  45. 23
      pkg/saz-pureftpd-0.0.1/templates/README.markdown
  46. 26
      pkg/saz-pureftpd-0.0.1/templates/default_config.erb
  47. 1
      pkg/saz-pureftpd-0.0.1/tests/init.pp
  48. BIN
      pkg/saz-pureftpd-1.0.0.tar.gz
  49. 8
      pkg/saz-pureftpd-1.0.0/Modulefile
  50. 3
      pkg/saz-pureftpd-1.0.0/README
  51. 22
      pkg/saz-pureftpd-1.0.0/files/README.markdown
  52. 1
      pkg/saz-pureftpd-1.0.0/files/debian/AltLog
  53. 1
      pkg/saz-pureftpd-1.0.0/files/debian/ChrootEveryone
  54. 1
      pkg/saz-pureftpd-1.0.0/files/debian/DontResolve
  55. 1
      pkg/saz-pureftpd-1.0.0/files/debian/MaxClientsNumber
  56. 1
      pkg/saz-pureftpd-1.0.0/files/debian/MinUID
  57. 1
      pkg/saz-pureftpd-1.0.0/files/debian/NoAnonymous
  58. 1
      pkg/saz-pureftpd-1.0.0/files/debian/PAMAuthentication
  59. 1
      pkg/saz-pureftpd-1.0.0/files/debian/PureDB
  60. 1
      pkg/saz-pureftpd-1.0.0/files/debian/UnixAuthentication
  61. 1
      pkg/saz-pureftpd-1.0.0/files/debian/VerboseLog
  62. 23
      pkg/saz-pureftpd-1.0.0/manifests/config.pp
  63. 16
      pkg/saz-pureftpd-1.0.0/manifests/init.pp
  64. 5
      pkg/saz-pureftpd-1.0.0/manifests/install.pp
  65. 22
      pkg/saz-pureftpd-1.0.0/manifests/params.pp
  66. 9
      pkg/saz-pureftpd-1.0.0/manifests/service.pp
  67. 45
      pkg/saz-pureftpd-1.0.0/metadata.json
  68. 7
      pkg/saz-pureftpd-1.0.0/spec/README.markdown
  69. 6
      pkg/saz-pureftpd-1.0.0/spec/spec.opts
  70. 18
      pkg/saz-pureftpd-1.0.0/spec/spec_helper.rb
  71. 4
      pkg/saz-pureftpd-1.0.0/spec/unit/puppet/provider/README.markdown
  72. 4
      pkg/saz-pureftpd-1.0.0/spec/unit/puppet/type/README.markdown
  73. 23
      pkg/saz-pureftpd-1.0.0/templates/README.markdown
  74. 26
      pkg/saz-pureftpd-1.0.0/templates/default_config.erb
  75. 1
      pkg/saz-pureftpd-1.0.0/tests/init.pp
  76. 7
      spec/README.markdown
  77. 6
      spec/spec.opts
  78. 18
      spec/spec_helper.rb
  79. 4
      spec/unit/puppet/provider/README.markdown
  80. 4
      spec/unit/puppet/type/README.markdown
  81. 23
      templates/README.markdown
  82. 26
      templates/default_config.erb
  83. 1
      tests/init.pp

8
Modulefile

@ -0,0 +1,8 @@
name 'saz-pureftpd'
version '1.0.0'
source 'UNKNOWN'
author 'saz'
license 'UNKNOWN'
summary 'UNKNOWN'
description 'Module for configuring pure-ftpd via puppet'
project_page 'https://github.com/saz/puppet-pureftpd'

3
README

@ -0,0 +1,3 @@
pureftpd
This is the pureftpd module.

22
files/README.markdown

@ -0,0 +1,22 @@
Files
=====
Puppet comes with both a client and server for copying files around. The file
serving function is provided as part of the central Puppet daemon,
puppetmasterd, and the client function is used through the source attribute of
file objects. Learn more at
http://projects.puppetlabs.com/projects/puppet/wiki/File_Serving_Configuration
You can use managed files like this:
class myclass {
package { mypackage: ensure => latest }
service { myservice: ensure => running }
file { "/etc/myfile":
source => "puppet://$servername/modules/mymodule/myfile"
}
}
The files are searched for in:
$modulepath/mymodule/files/myfile

1
files/debian/AltLog

@ -0,0 +1 @@
#clf:/var/log/pure-ftpd/transfer.log

1
files/debian/ChrootEveryone

@ -0,0 +1 @@
yes

1
files/debian/DontResolve

@ -0,0 +1 @@
yes

1
files/debian/MaxClientsNumber

@ -0,0 +1 @@
25

1
files/debian/MinUID

@ -0,0 +1 @@
33

1
files/debian/NoAnonymous

@ -0,0 +1 @@
yes

1
files/debian/PAMAuthentication

@ -0,0 +1 @@
yes

1
files/debian/PureDB

@ -0,0 +1 @@
/etc/pure-ftpd/pureftpd.pdb

1
files/debian/UnixAuthentication

@ -0,0 +1 @@
yes

1
files/debian/VerboseLog

@ -0,0 +1 @@
no

23
manifests/config.pp

@ -0,0 +1,23 @@
class pureftpd::config {
file { "${pureftpd::params::config_dir}conf":
ensure => directory,
recurse => true,
purge => true,
force => true,
owner => root,
group => root,
source => $source ? {
undef => "puppet:///modules/${module_name}/${pureftpd::params::config_source}",
default => $pureftpd::config_source,
},
require => Class['pureftpd::install'],
}
file { $pureftpd::params::config_default_file:
ensure => present,
owner => root,
group => root,
content => template("${module_name}/default_config.erb"),
require => Class['pureftpd::install'],
}
}

16
manifests/init.pp

@ -0,0 +1,16 @@
# Class: pureftpd
#
# This module manages pureftpd
#
# Parameters:
#
# Actions:
#
# Requires:
#
# Sample Usage:
#
# [Remember: No empty lines between comments and class definition]
class pureftpd ($auth_type = undef, $config_source = undef, $virtualchroot = false) {
include pureftpd::params, pureftpd::install, pureftpd::config, pureftpd::service
}

5
manifests/install.pp

@ -0,0 +1,5 @@
class pureftpd::install {
package { $pureftpd::params::package_name:
ensure => present,
}
}

22
manifests/params.pp

@ -0,0 +1,22 @@
class pureftpd::params {
case $operatingsystem {
/(Ubuntu|Debian)/: {
case $auth_type {
'mysql': { $real_auth_type = '-mysql' }
'ldap': { $real_auth_type = '-ldap' }
'postgresql': { $real_auth_type = '-postgresql' }
default: { $real_auth_type = '' }
}
$package_name = "pure-ftpd${real_auth_type}"
$config_dir = '/etc/pure-ftpd/'
$service_name = "pure-ftpd${real_auth_type}"
$config_default_file = '/etc/default/pure-ftpd-common'
$config_source = 'debian'
}
}
case $pureftpd::virtualchroot {
true: { $real_virtualchroot = true }
default: { $real_virtualchroot = false }
}
}

9
manifests/service.pp

@ -0,0 +1,9 @@
class pureftpd::service {
service { $pureftpd::params::service_name:
ensure => running,
enable => true,
hasrestart => true,
hasstatus => false,
require => Class['pureftpd::config'],
}
}

12
metadata.json

@ -0,0 +1,12 @@
/*
+-----------------------------------------------------------------------+
| |
| ==> DO NOT EDIT THIS FILE! <== |
| |
| You should edit the `Modulefile` and run `puppet-module build` |
| to generate the `metadata.json` file for your releases. |
| |
+-----------------------------------------------------------------------+
*/
{}

BIN
pkg/saz-pureftpd-0.0.1.tar.gz

Binary file not shown.

8
pkg/saz-pureftpd-0.0.1/Modulefile

@ -0,0 +1,8 @@
name 'saz-pureftpd'
version '0.0.1'
source 'UNKNOWN'
author 'saz'
license 'UNKNOWN'
summary 'UNKNOWN'
description 'Module for configuring pure-ftpd via puppet'
project_page 'https://github.com/saz/puppet-pureftpd'

3
pkg/saz-pureftpd-0.0.1/README

@ -0,0 +1,3 @@
pureftpd
This is the pureftpd module.

22
pkg/saz-pureftpd-0.0.1/files/README.markdown

@ -0,0 +1,22 @@
Files
=====
Puppet comes with both a client and server for copying files around. The file
serving function is provided as part of the central Puppet daemon,
puppetmasterd, and the client function is used through the source attribute of
file objects. Learn more at
http://projects.puppetlabs.com/projects/puppet/wiki/File_Serving_Configuration
You can use managed files like this:
class myclass {
package { mypackage: ensure => latest }
service { myservice: ensure => running }
file { "/etc/myfile":
source => "puppet://$servername/modules/mymodule/myfile"
}
}
The files are searched for in:
$modulepath/mymodule/files/myfile

1
pkg/saz-pureftpd-0.0.1/files/debian/AltLog

@ -0,0 +1 @@
#clf:/var/log/pure-ftpd/transfer.log

1
pkg/saz-pureftpd-0.0.1/files/debian/ChrootEveryone

@ -0,0 +1 @@
yes

1
pkg/saz-pureftpd-0.0.1/files/debian/DontResolve

@ -0,0 +1 @@
yes

1
pkg/saz-pureftpd-0.0.1/files/debian/MaxClientsNumber

@ -0,0 +1 @@
25

1
pkg/saz-pureftpd-0.0.1/files/debian/MinUID

@ -0,0 +1 @@
33

1
pkg/saz-pureftpd-0.0.1/files/debian/NoAnonymous

@ -0,0 +1 @@
yes

1
pkg/saz-pureftpd-0.0.1/files/debian/PAMAuthentication

@ -0,0 +1 @@
yes

1
pkg/saz-pureftpd-0.0.1/files/debian/PureDB

@ -0,0 +1 @@
/etc/pure-ftpd/pureftpd.pdb

1
pkg/saz-pureftpd-0.0.1/files/debian/UnixAuthentication

@ -0,0 +1 @@
yes

1
pkg/saz-pureftpd-0.0.1/files/debian/VerboseLog

@ -0,0 +1 @@
no

23
pkg/saz-pureftpd-0.0.1/manifests/config.pp

@ -0,0 +1,23 @@
class pureftpd::config {
file { "${pureftpd::params::config_dir}conf":
ensure => directory,
recurse => true,
purge => true,
force => true,
owner => root,
group => root,
source => $source ? {
undef => "puppet:///modules/${module_name}/${pureftpd::params::config_source}",
default => $pureftpd::config_source,
},
require => Class['pureftpd::install'],
}
file { $pureftpd::params::config_default_file:
ensure => present,
owner => root,
group => root,
content => template("${module_name}/default_config.erb"),
require => Class['pureftpd::install'],
}
}

16
pkg/saz-pureftpd-0.0.1/manifests/init.pp

@ -0,0 +1,16 @@
# Class: pureftpd
#
# This module manages pureftpd
#
# Parameters:
#
# Actions:
#
# Requires:
#
# Sample Usage:
#
# [Remember: No empty lines between comments and class definition]
class pureftpd ($auth_type = undef, $config_source = undef, $virtualchroot = false) {
include pureftpd::params, pureftpd::install, pureftpd::config, pureftpd::service
}

5
pkg/saz-pureftpd-0.0.1/manifests/install.pp

@ -0,0 +1,5 @@
class pureftpd::install {
package { $pureftpd::params::package_name:
ensure => present,
}
}

22
pkg/saz-pureftpd-0.0.1/manifests/params.pp

@ -0,0 +1,22 @@
class pureftpd::params {
case $operatingsystem {
/(Ubuntu|Debian)/: {
case $auth_type {
'mysql': { $real_auth_type = '-mysql' }
'ldap': { $real_auth_type = '-ldap' }
'postgresql': { $real_auth_type = '-postgresql' }
default: { $real_auth_type = '' }
}
$package_name = "pure-ftpd${real_auth_type}"
$config_dir = '/etc/pure-ftpd/'
$service_name = "pure-ftpd${real_auth_type}"
$config_default_file = '/etc/default/pure-ftpd-common'
$config_source = 'debian'
}
}
case $pureftpd::virtualchroot {
true: { $real_virtualchroot = true }
default: { $real_virtualchroot = false }
}
}

9
pkg/saz-pureftpd-0.0.1/manifests/service.pp

@ -0,0 +1,9 @@
class pureftpd::service {
service { $pureftpd::params::service_name:
ensure => running,
enable => true,
hasrestart => true,
hasstatus => false,
require => Class['pureftpd::config'],
}
}

45
pkg/saz-pureftpd-0.0.1/metadata.json

@ -0,0 +1,45 @@
{
"summary": "UNKNOWN",
"project_page": "https://github.com/saz/puppet-pureftpd",
"author": "saz",
"source": "UNKNOWN",
"dependencies": [
],
"checksums": {
"manifests/params.pp": "e7b3cf3a6115e96a6f76d3ff2c545625",
"files/debian/AltLog": "a3d7f89dc916062234237acf75bde97d",
"files/debian/MinUID": "4fbafd6948b6529caa2b78e476359875",
"spec/spec_helper.rb": "ca19ec4f451ebc7fdb035b52eae6e909",
"files/debian/NoAnonymous": "eb4585ad9fe0426781ed7c49252f8225",
"spec/unit/puppet/provider/README.markdown": "e52668944ee6af2fb5d5b9e798342645",
"files/README.markdown": "3d44458cc68d8513b51e3b56c604eec4",
"files/debian/DontResolve": "eb4585ad9fe0426781ed7c49252f8225",
"files/debian/PureDB": "6db5965698527e1f140dfc73ed40d47c",
"files/debian/UnixAuthentication": "eb4585ad9fe0426781ed7c49252f8225",
"manifests/config.pp": "9a67980c30c5d3c0c0fd9ecfb81627a8",
"README": "34cdc51f71f626da2194b0bbf2e6a6e6",
"manifests/service.pp": "722d62651e6c61da4330332b6382f5a9",
"templates/README.markdown": "aada0a1952329e46b98695349dba6203",
"templates/default_config.erb": "222945189c5b8d4efa9fe2c3cc01f435",
"tests/init.pp": "5d6e84bd06e23c4d565782db67e333ec",
"files/debian/PAMAuthentication": "eb4585ad9fe0426781ed7c49252f8225",
"spec/README.markdown": "32a1fc0121c28aff554ef5d422b8b51e",
"manifests/install.pp": "51caa25f90a479cd501824362b9bdba1",
"files/debian/VerboseLog": "7fa3b767c460b54a2be4d49030b349c7",
"files/debian/MaxClientsNumber": "2a52a5e65fc3c43f409550dfad1f904f",
"metadata.json": "d34d0b70aba36510fbc2df4e667479ef",
"files/debian/ChrootEveryone": "eb4585ad9fe0426781ed7c49252f8225",
"spec/spec.opts": "a600ded995d948e393fbe2320ba8e51c",
"Modulefile": "001e56189832cdc6d7856a6baecd2443",
"manifests/init.pp": "61675a905c40641e70d6f74985fda8c8",
"spec/unit/puppet/type/README.markdown": "de26a7643813abd6c2e7e28071b1ef94"
},
"license": "UNKNOWN",
"types": [
],
"version": "0.0.1",
"name": "saz-pureftpd",
"description": "Module for configuring pure-ftpd via puppet"
}

7
pkg/saz-pureftpd-0.0.1/spec/README.markdown

@ -0,0 +1,7 @@
Specs
=====
The Puppet project uses RSpec for testing.
For more information on RSpec, see http://rspec.info/

6
pkg/saz-pureftpd-0.0.1/spec/spec.opts

@ -0,0 +1,6 @@
--format
s
--colour
--loadby
mtime
--backtrace

18
pkg/saz-pureftpd-0.0.1/spec/spec_helper.rb

@ -0,0 +1,18 @@
require 'pathname'
dir = Pathname.new(__FILE__).parent
$LOAD_PATH.unshift(dir, dir + 'lib', dir + '../lib')
require 'mocha'
require 'puppet'
gem 'rspec', '=1.2.9'
require 'spec/autorun'
Spec::Runner.configure do |config|
config.mock_with :mocha
end
# We need this because the RAL uses 'should' as a method. This
# allows us the same behaviour but with a different method name.
class Object
alias :must :should
end

4
pkg/saz-pureftpd-0.0.1/spec/unit/puppet/provider/README.markdown

@ -0,0 +1,4 @@
Provider Specs
==============
Define specs for your providers under this directory.

4
pkg/saz-pureftpd-0.0.1/spec/unit/puppet/type/README.markdown

@ -0,0 +1,4 @@
Resource Type Specs
===================
Define specs for your resource types in this directory.

23
pkg/saz-pureftpd-0.0.1/templates/README.markdown

@ -0,0 +1,23 @@
Templates
=========
Puppet supports templates and templating via ERB, which is part of the Ruby
standard library and is used for many other projects including Ruby on Rails.
Templates allow you to manage the content of template files, for example
configuration files that cannot yet be managed as a Puppet type. Learn more at
http://projects.puppetlabs.com/projects/puppet/wiki/Puppet_Templating
You can use templates like this:
class myclass {
package { mypackage: ensure => latest }
service { myservice: ensure => running }
file { "/etc/myfile":
content => template("mymodule/myfile.erb")
}
}
The templates are searched for in:
$templatedir/mymodule/myfile.erb
$modulepath/mymodule/templates/myfile.erb

26
pkg/saz-pureftpd-0.0.1/templates/default_config.erb

@ -0,0 +1,26 @@
# Configuration for pure-ftpd
# (this file is sourced by /bin/sh, edit accordingly)
# STANDALONE_OR_INETD
# valid values are "standalone" and "inetd".
# Any change here overrides the setting in debconf.
STANDALONE_OR_INETD=standalone
# VIRTUALCHROOT:
# whether to use binary with virtualchroot support
# valid values are "true" or "false"
# Any change here overrides the setting in debconf.
VIRTUALCHROOT=<%= scope.lookupvar('pureftpd::params::real_virtualchroot') %>
# UPLOADSCRIPT: if this is set and the daemon is run in standalone mode,
# pure-uploadscript will also be run to spawn the program given below
# for handling uploads. see /usr/share/doc/pure-ftpd/README.gz or
# pure-uploadscript(8)
# example: UPLOADSCRIPT=/usr/local/sbin/uploadhandler.pl
UPLOADSCRIPT=
# if set, pure-uploadscript will spawn $UPLOADSCRIPT running as the
# given uid and gid
UPLOADUID=
UPLOADGID=

1
pkg/saz-pureftpd-0.0.1/tests/init.pp

@ -0,0 +1 @@
include pureftpd

BIN
pkg/saz-pureftpd-1.0.0.tar.gz

Binary file not shown.

8
pkg/saz-pureftpd-1.0.0/Modulefile

@ -0,0 +1,8 @@
name 'saz-pureftpd'
version '1.0.0'
source 'UNKNOWN'
author 'saz'
license 'UNKNOWN'
summary 'UNKNOWN'
description 'Module for configuring pure-ftpd via puppet'
project_page 'https://github.com/saz/puppet-pureftpd'

3
pkg/saz-pureftpd-1.0.0/README

@ -0,0 +1,3 @@
pureftpd
This is the pureftpd module.

22
pkg/saz-pureftpd-1.0.0/files/README.markdown

@ -0,0 +1,22 @@
Files
=====
Puppet comes with both a client and server for copying files around. The file
serving function is provided as part of the central Puppet daemon,
puppetmasterd, and the client function is used through the source attribute of
file objects. Learn more at
http://projects.puppetlabs.com/projects/puppet/wiki/File_Serving_Configuration
You can use managed files like this:
class myclass {
package { mypackage: ensure => latest }
service { myservice: ensure => running }
file { "/etc/myfile":
source => "puppet://$servername/modules/mymodule/myfile"
}
}
The files are searched for in:
$modulepath/mymodule/files/myfile

1
pkg/saz-pureftpd-1.0.0/files/debian/AltLog

@ -0,0 +1 @@
#clf:/var/log/pure-ftpd/transfer.log

1
pkg/saz-pureftpd-1.0.0/files/debian/ChrootEveryone

@ -0,0 +1 @@
yes

1
pkg/saz-pureftpd-1.0.0/files/debian/DontResolve

@ -0,0 +1 @@
yes

1
pkg/saz-pureftpd-1.0.0/files/debian/MaxClientsNumber

@ -0,0 +1 @@
25

1
pkg/saz-pureftpd-1.0.0/files/debian/MinUID

@ -0,0 +1 @@
33

1
pkg/saz-pureftpd-1.0.0/files/debian/NoAnonymous

@ -0,0 +1 @@
yes

1
pkg/saz-pureftpd-1.0.0/files/debian/PAMAuthentication

@ -0,0 +1 @@
yes

1
pkg/saz-pureftpd-1.0.0/files/debian/PureDB

@ -0,0 +1 @@
/etc/pure-ftpd/pureftpd.pdb

1
pkg/saz-pureftpd-1.0.0/files/debian/UnixAuthentication

@ -0,0 +1 @@
yes

1
pkg/saz-pureftpd-1.0.0/files/debian/VerboseLog

@ -0,0 +1 @@
no

23
pkg/saz-pureftpd-1.0.0/manifests/config.pp

@ -0,0 +1,23 @@
class pureftpd::config {
file { "${pureftpd::params::config_dir}conf":
ensure => directory,
recurse => true,
purge => true,
force => true,
owner => root,
group => root,
source => $source ? {
undef => "puppet:///modules/${module_name}/${pureftpd::params::config_source}",
default => $pureftpd::config_source,
},
require => Class['pureftpd::install'],
}
file { $pureftpd::params::config_default_file:
ensure => present,
owner => root,
group => root,
content => template("${module_name}/default_config.erb"),
require => Class['pureftpd::install'],
}
}

16
pkg/saz-pureftpd-1.0.0/manifests/init.pp

@ -0,0 +1,16 @@
# Class: pureftpd
#
# This module manages pureftpd
#
# Parameters:
#
# Actions:
#
# Requires:
#
# Sample Usage:
#
# [Remember: No empty lines between comments and class definition]
class pureftpd ($auth_type = undef, $config_source = undef, $virtualchroot = false) {
include pureftpd::params, pureftpd::install, pureftpd::config, pureftpd::service
}

5
pkg/saz-pureftpd-1.0.0/manifests/install.pp

@ -0,0 +1,5 @@
class pureftpd::install {
package { $pureftpd::params::package_name:
ensure => present,
}
}

22
pkg/saz-pureftpd-1.0.0/manifests/params.pp

@ -0,0 +1,22 @@
class pureftpd::params {
case $operatingsystem {
/(Ubuntu|Debian)/: {
case $auth_type {
'mysql': { $real_auth_type = '-mysql' }
'ldap': { $real_auth_type = '-ldap' }
'postgresql': { $real_auth_type = '-postgresql' }
default: { $real_auth_type = '' }
}
$package_name = "pure-ftpd${real_auth_type}"
$config_dir = '/etc/pure-ftpd/'
$service_name = "pure-ftpd${real_auth_type}"
$config_default_file = '/etc/default/pure-ftpd-common'
$config_source = 'debian'
}
}
case $pureftpd::virtualchroot {
true: { $real_virtualchroot = true }
default: { $real_virtualchroot = false }
}
}

9
pkg/saz-pureftpd-1.0.0/manifests/service.pp

@ -0,0 +1,9 @@
class pureftpd::service {
service { $pureftpd::params::service_name:
ensure => running,
enable => true,
hasrestart => true,
hasstatus => false,
require => Class['pureftpd::config'],
}
}

45
pkg/saz-pureftpd-1.0.0/metadata.json

@ -0,0 +1,45 @@
{
"summary": "UNKNOWN",
"project_page": "https://github.com/saz/puppet-pureftpd",
"author": "saz",
"source": "UNKNOWN",
"dependencies": [
],
"checksums": {
"manifests/params.pp": "e7b3cf3a6115e96a6f76d3ff2c545625",
"files/debian/AltLog": "a3d7f89dc916062234237acf75bde97d",
"files/debian/MinUID": "4fbafd6948b6529caa2b78e476359875",
"spec/spec_helper.rb": "ca19ec4f451ebc7fdb035b52eae6e909",
"files/debian/NoAnonymous": "eb4585ad9fe0426781ed7c49252f8225",
"spec/unit/puppet/provider/README.markdown": "e52668944ee6af2fb5d5b9e798342645",
"files/README.markdown": "3d44458cc68d8513b51e3b56c604eec4",
"files/debian/DontResolve": "eb4585ad9fe0426781ed7c49252f8225",
"files/debian/PureDB": "6db5965698527e1f140dfc73ed40d47c",
"files/debian/UnixAuthentication": "eb4585ad9fe0426781ed7c49252f8225",
"manifests/config.pp": "9a67980c30c5d3c0c0fd9ecfb81627a8",
"README": "34cdc51f71f626da2194b0bbf2e6a6e6",
"manifests/service.pp": "722d62651e6c61da4330332b6382f5a9",
"templates/README.markdown": "aada0a1952329e46b98695349dba6203",
"templates/default_config.erb": "222945189c5b8d4efa9fe2c3cc01f435",
"tests/init.pp": "5d6e84bd06e23c4d565782db67e333ec",
"files/debian/PAMAuthentication": "eb4585ad9fe0426781ed7c49252f8225",
"spec/README.markdown": "32a1fc0121c28aff554ef5d422b8b51e",
"manifests/install.pp": "51caa25f90a479cd501824362b9bdba1",
"files/debian/VerboseLog": "7fa3b767c460b54a2be4d49030b349c7",
"files/debian/MaxClientsNumber": "2a52a5e65fc3c43f409550dfad1f904f",
"metadata.json": "d34d0b70aba36510fbc2df4e667479ef",
"files/debian/ChrootEveryone": "eb4585ad9fe0426781ed7c49252f8225",
"spec/spec.opts": "a600ded995d948e393fbe2320ba8e51c",
"Modulefile": "f8bddfe97a67a6d778a08b9b570a3ee1",
"manifests/init.pp": "61675a905c40641e70d6f74985fda8c8",
"spec/unit/puppet/type/README.markdown": "de26a7643813abd6c2e7e28071b1ef94"
},
"license": "UNKNOWN",
"types": [
],
"version": "1.0.0",
"name": "saz-pureftpd",
"description": "Module for configuring pure-ftpd via puppet"
}

7
pkg/saz-pureftpd-1.0.0/spec/README.markdown

@ -0,0 +1,7 @@
Specs
=====
The Puppet project uses RSpec for testing.
For more information on RSpec, see http://rspec.info/

6
pkg/saz-pureftpd-1.0.0/spec/spec.opts

@ -0,0 +1,6 @@
--format
s
--colour
--loadby
mtime
--backtrace

18
pkg/saz-pureftpd-1.0.0/spec/spec_helper.rb

@ -0,0 +1,18 @@
require 'pathname'
dir = Pathname.new(__FILE__).parent
$LOAD_PATH.unshift(dir, dir + 'lib', dir + '../lib')
require 'mocha'
require 'puppet'
gem 'rspec', '=1.2.9'
require 'spec/autorun'
Spec::Runner.configure do |config|
config.mock_with :mocha
end
# We need this because the RAL uses 'should' as a method. This
# allows us the same behaviour but with a different method name.
class Object
alias :must :should
end

4
pkg/saz-pureftpd-1.0.0/spec/unit/puppet/provider/README.markdown

@ -0,0 +1,4 @@
Provider Specs
==============
Define specs for your providers under this directory.

4
pkg/saz-pureftpd-1.0.0/spec/unit/puppet/type/README.markdown

@ -0,0 +1,4 @@
Resource Type Specs
===================
Define specs for your resource types in this directory.

23
pkg/saz-pureftpd-1.0.0/templates/README.markdown

@ -0,0 +1,23 @@
Templates
=========
Puppet supports templates and templating via ERB, which is part of the Ruby
standard library and is used for many other projects including Ruby on Rails.
Templates allow you to manage the content of template files, for example
configuration files that cannot yet be managed as a Puppet type. Learn more at
http://projects.puppetlabs.com/projects/puppet/wiki/Puppet_Templating
You can use templates like this:
class myclass {
package { mypackage: ensure => latest }
service { myservice: ensure => running }
file { "/etc/myfile":
content => template("mymodule/myfile.erb")
}
}
The templates are searched for in:
$templatedir/mymodule/myfile.erb
$modulepath/mymodule/templates/myfile.erb

26
pkg/saz-pureftpd-1.0.0/templates/default_config.erb

@ -0,0 +1,26 @@
# Configuration for pure-ftpd
# (this file is sourced by /bin/sh, edit accordingly)
# STANDALONE_OR_INETD
# valid values are "standalone" and "inetd".
# Any change here overrides the setting in debconf.
STANDALONE_OR_INETD=standalone
# VIRTUALCHROOT:
# whether to use binary with virtualchroot support
# valid values are "true" or "false"
# Any change here overrides the setting in debconf.
VIRTUALCHROOT=<%= scope.lookupvar('pureftpd::params::real_virtualchroot') %>
# UPLOADSCRIPT: if this is set and the daemon is run in standalone mode,
# pure-uploadscript will also be run to spawn the program given below
# for handling uploads. see /usr/share/doc/pure-ftpd/README.gz or
# pure-uploadscript(8)
# example: UPLOADSCRIPT=/usr/local/sbin/uploadhandler.pl
UPLOADSCRIPT=
# if set, pure-uploadscript will spawn $UPLOADSCRIPT running as the
# given uid and gid
UPLOADUID=
UPLOADGID=

1
pkg/saz-pureftpd-1.0.0/tests/init.pp

@ -0,0 +1 @@
include pureftpd

7
spec/README.markdown

@ -0,0 +1,7 @@
Specs
=====
The Puppet project uses RSpec for testing.
For more information on RSpec, see http://rspec.info/

6
spec/spec.opts

@ -0,0 +1,6 @@
--format
s
--colour
--loadby
mtime
--backtrace

18
spec/spec_helper.rb

@ -0,0 +1,18 @@
require 'pathname'
dir = Pathname.new(__FILE__).parent
$LOAD_PATH.unshift(dir, dir + 'lib', dir + '../lib')
require 'mocha'
require 'puppet'
gem 'rspec', '=1.2.9'
require 'spec/autorun'
Spec::Runner.configure do |config|
config.mock_with :mocha
end
# We need this because the RAL uses 'should' as a method. This
# allows us the same behaviour but with a different method name.
class Object
alias :must :should
end

4
spec/unit/puppet/provider/README.markdown

@ -0,0 +1,4 @@
Provider Specs
==============
Define specs for your providers under this directory.

4
spec/unit/puppet/type/README.markdown

@ -0,0 +1,4 @@
Resource Type Specs
===================
Define specs for your resource types in this directory.

23
templates/README.markdown

@ -0,0 +1,23 @@
Templates
=========
Puppet supports templates and templating via ERB, which is part of the Ruby
standard library and is used for many other projects including Ruby on Rails.
Templates allow you to manage the content of template files, for example
configuration files that cannot yet be managed as a Puppet type. Learn more at
http://projects.puppetlabs.com/projects/puppet/wiki/Puppet_Templating
You can use templates like this:
class myclass {
package { mypackage: ensure => latest }
service { myservice: ensure => running }
file { "/etc/myfile":
content => template("mymodule/myfile.erb")
}
}
The templates are searched for in:
$templatedir/mymodule/myfile.erb
$modulepath/mymodule/templates/myfile.erb

26
templates/default_config.erb

@ -0,0 +1,26 @@
# Configuration for pure-ftpd
# (this file is sourced by /bin/sh, edit accordingly)
# STANDALONE_OR_INETD
# valid values are "standalone" and "inetd".
# Any change here overrides the setting in debconf.
STANDALONE_OR_INETD=standalone
# VIRTUALCHROOT:
# whether to use binary with virtualchroot support
# valid values are "true" or "false"
# Any change here overrides the setting in debconf.
VIRTUALCHROOT=<%= scope.lookupvar('pureftpd::params::real_virtualchroot') %>
# UPLOADSCRIPT: if this is set and the daemon is run in standalone mode,
# pure-uploadscript will also be run to spawn the program given below
# for handling uploads. see /usr/share/doc/pure-ftpd/README.gz or
# pure-uploadscript(8)
# example: UPLOADSCRIPT=/usr/local/sbin/uploadhandler.pl
UPLOADSCRIPT=
# if set, pure-uploadscript will spawn $UPLOADSCRIPT running as the
# given uid and gid
UPLOADUID=
UPLOADGID=

1
tests/init.pp

@ -0,0 +1 @@
include pureftpd
Loading…
Cancel
Save