cookbook 'proftpd-ii', '~> 0.5.5'
proftpd-ii (6) Versions 0.5.5 Follow0
Installs/Configures proftpd-ii
cookbook 'proftpd-ii', '~> 0.5.5', :supermarket
knife supermarket install proftpd-ii
knife supermarket download proftpd-ii
proftpd-ii Cookbook
Installs and configures ProFTPd Server (http://www.proftpd.org/) and some of
its modules. It also setups configuration like Apache's scripts (
(eg. sites-available/
sites-enabled`).
It provides an LWRP for easily deploying virtualhosts. It's recommended to
always use a vhost configuration instead of the default, global configuration.
The latest and greatest revision of this cookbook will always be available
at https://github.com/Movile/chef-proftpd-ii
Requirements
Cookbooks
The following cookbooks are dependencies for this:
- yum-repoforge - needed to install RPM packages for proftpd.
Platform
The following platforms are supported and tested:
- CentOS 6.7
- CentOS 7.2
Chef Server
The recommended chef version is at least >= 11.0
Usage
To use the cookbook, you can just add the default
recipe to the run_list. It
will install and configure the daemon. Then you can use attributes or LWRPs to
configure custom values and virtual hosts.
Helper Recipes
ldap.rb
installs the LDAP module, enables it and provides a sample
configuration.sftp.rb
installs the sFTP module, enables it and provides a sample
configuration.example_lwrp.rb
provides some examples on using the LWRP resources.
Attributes
Attributes are documented on attributes/default.rb
file. This way I don't need
to duplicate definitions here and there :)
LWRP
vhost
This cookbook includes proftpd_vhost
LWRP which facilitates creating a new
virtual host. It also contains support for using notifies
, so you can notify
the server to reload after some configuration changes.
For example, to use the proftpd_vhost
:
# install first include_recipe 'proftpd-ii' # a normal ftp site proftpd_vhost 'ftp' do enable true port 21 notifies :restart, 'service[proftpd]', :delayed end # a tls and ldap-enabled site proftpd_vhost 'ldap' do port 990 debug_level 10 auth_order 'mod_ldap.c' tls true tls_required true tls_cert /etc/proftpd/ssl/proftpd.crt.pem tls_key /etc/proftpd/ssl/proftpd.key.pem ldap true ldap_use_tls true ldap_server 'ldap.example.com:389' ldap_user_base_dn 'ou=users,dc=example,dc=com' ldap_user_filter '(uid=%u)' ldap_group_base_dn 'ou=groups,dc=example,dc=com' ldap_group_filter '(&(memberUid=%u)(objectclass=posixGroup))' options = { 'QueryTimeout' => 30, 'ForceGeneratedHomedir' => 'on' } ldap_extra_options options notifies :restart, 'service[proftpd]', :delayed end # sftp, if module enabled proftpd_vhost 'sftp' do port 2222 sftp true notifies :restart, 'service[proftpd]', :delayed end
If you want to configure but not enable the virtual host, you can use
enable false
on the LWRP definition.
module
Enables a module in the configuration.
It creates a LoadModule
directive and puts it on mods-enabled
directory.
For example, enabling some custom modules:
proftpd_module 'ldap' proftpd_module 'sftp'
License and Author
- Author:: Hugo Cisneiros (hugo.cisneiros@movile.com)
Copyright 2016, Movile
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Dependent cookbooks
yum-repoforge >= 0.0.0 |
Contingent cookbooks
There are no cookbooks that are contingent upon this one.
proftpd-ii CHANGELOG
This file is used to list changes made in each version of the proftpd-ii cookbook.
0.5.3
- Added SFTPAuthorizedUserKeys directive
0.5.2
- Added TLSCertificateChainFile directive
0.5.1
- Global section with all default server directives (#4)
- Development: support for centos7 with docker on vagrant
- Added CreateHome directive
- sFTP package/example is optional since it's a custom package
- Attribute explanations on
attributes/default.rb
0.5.0
- Added support for sFTP module and configuration
0.4.0
- Added support for TLS configuration
0.3.0
- Added support for LDAP module and configuration
0.2.0
- Support for LWRPs
0.1.0
- Initial release of proftpd-ii
Collaborator Number Metric
0.5.5 failed this metric
Failure: Cookbook has 0 collaborators. A cookbook must have at least 2 collaborators to pass this metric.
Contributing File Metric
0.5.5 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a CONTRIBUTING.md file
Foodcritic Metric
0.5.5 failed this metric
FC009: Resource attribute not recognised: proftpd-ii/recipes/default.rb:39
FC085: Resource using new_resource.updated_by_last_action to converge resource: proftpd-ii/providers/conf.rb:33
FC085: Resource using new_resource.updated_by_last_action to converge resource: proftpd-ii/providers/conf.rb:42
FC085: Resource using new_resource.updated_by_last_action to converge resource: proftpd-ii/providers/module.rb:61
FC085: Resource using new_resource.updated_by_last_action to converge resource: proftpd-ii/providers/module.rb:62
FC085: Resource using new_resource.updated_by_last_action to converge resource: proftpd-ii/providers/module.rb:63
FC085: Resource using new_resource.updated_by_last_action to converge resource: proftpd-ii/providers/module.rb:64
FC085: Resource using new_resource.updated_by_last_action to converge resource: proftpd-ii/providers/module.rb:85
FC085: Resource using new_resource.updated_by_last_action to converge resource: proftpd-ii/providers/module.rb:86
FC085: Resource using new_resource.updated_by_last_action to converge resource: proftpd-ii/providers/module.rb:87
FC085: Resource using new_resource.updated_by_last_action to converge resource: proftpd-ii/providers/module.rb:88
FC085: Resource using new_resource.updated_by_last_action to converge resource: proftpd-ii/providers/vhost.rb:74
FC085: Resource using new_resource.updated_by_last_action to converge resource: proftpd-ii/providers/vhost.rb:75
FC085: Resource using new_resource.updated_by_last_action to converge resource: proftpd-ii/providers/vhost.rb:88
FC085: Resource using new_resource.updated_by_last_action to converge resource: proftpd-ii/providers/vhost.rb:89
Run with Foodcritic Version 16.3.0 with tags metadata,correctness ~FC031 ~FC045 and failure tags any
No Binaries Metric
0.5.5 passed this metric
Testing File Metric
0.5.5 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a TESTING.md file
Version Tag Metric
0.5.5 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must include a tag that matches this cookbook version number
0.5.5 failed this metric
0.5.5 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a CONTRIBUTING.md file
Foodcritic Metric
0.5.5 failed this metric
FC009: Resource attribute not recognised: proftpd-ii/recipes/default.rb:39
FC085: Resource using new_resource.updated_by_last_action to converge resource: proftpd-ii/providers/conf.rb:33
FC085: Resource using new_resource.updated_by_last_action to converge resource: proftpd-ii/providers/conf.rb:42
FC085: Resource using new_resource.updated_by_last_action to converge resource: proftpd-ii/providers/module.rb:61
FC085: Resource using new_resource.updated_by_last_action to converge resource: proftpd-ii/providers/module.rb:62
FC085: Resource using new_resource.updated_by_last_action to converge resource: proftpd-ii/providers/module.rb:63
FC085: Resource using new_resource.updated_by_last_action to converge resource: proftpd-ii/providers/module.rb:64
FC085: Resource using new_resource.updated_by_last_action to converge resource: proftpd-ii/providers/module.rb:85
FC085: Resource using new_resource.updated_by_last_action to converge resource: proftpd-ii/providers/module.rb:86
FC085: Resource using new_resource.updated_by_last_action to converge resource: proftpd-ii/providers/module.rb:87
FC085: Resource using new_resource.updated_by_last_action to converge resource: proftpd-ii/providers/module.rb:88
FC085: Resource using new_resource.updated_by_last_action to converge resource: proftpd-ii/providers/vhost.rb:74
FC085: Resource using new_resource.updated_by_last_action to converge resource: proftpd-ii/providers/vhost.rb:75
FC085: Resource using new_resource.updated_by_last_action to converge resource: proftpd-ii/providers/vhost.rb:88
FC085: Resource using new_resource.updated_by_last_action to converge resource: proftpd-ii/providers/vhost.rb:89
Run with Foodcritic Version 16.3.0 with tags metadata,correctness ~FC031 ~FC045 and failure tags any
No Binaries Metric
0.5.5 passed this metric
Testing File Metric
0.5.5 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a TESTING.md file
Version Tag Metric
0.5.5 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must include a tag that matches this cookbook version number
0.5.5 failed this metric
FC085: Resource using new_resource.updated_by_last_action to converge resource: proftpd-ii/providers/conf.rb:33
FC085: Resource using new_resource.updated_by_last_action to converge resource: proftpd-ii/providers/conf.rb:42
FC085: Resource using new_resource.updated_by_last_action to converge resource: proftpd-ii/providers/module.rb:61
FC085: Resource using new_resource.updated_by_last_action to converge resource: proftpd-ii/providers/module.rb:62
FC085: Resource using new_resource.updated_by_last_action to converge resource: proftpd-ii/providers/module.rb:63
FC085: Resource using new_resource.updated_by_last_action to converge resource: proftpd-ii/providers/module.rb:64
FC085: Resource using new_resource.updated_by_last_action to converge resource: proftpd-ii/providers/module.rb:85
FC085: Resource using new_resource.updated_by_last_action to converge resource: proftpd-ii/providers/module.rb:86
FC085: Resource using new_resource.updated_by_last_action to converge resource: proftpd-ii/providers/module.rb:87
FC085: Resource using new_resource.updated_by_last_action to converge resource: proftpd-ii/providers/module.rb:88
FC085: Resource using new_resource.updated_by_last_action to converge resource: proftpd-ii/providers/vhost.rb:74
FC085: Resource using new_resource.updated_by_last_action to converge resource: proftpd-ii/providers/vhost.rb:75
FC085: Resource using new_resource.updated_by_last_action to converge resource: proftpd-ii/providers/vhost.rb:88
FC085: Resource using new_resource.updated_by_last_action to converge resource: proftpd-ii/providers/vhost.rb:89
Run with Foodcritic Version 16.3.0 with tags metadata,correctness ~FC031 ~FC045 and failure tags any
0.5.5 passed this metric
Testing File Metric
0.5.5 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a TESTING.md file
Version Tag Metric
0.5.5 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must include a tag that matches this cookbook version number
0.5.5 failed this metric
0.5.5 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must include a tag that matches this cookbook version number