Version information
This version is compatible with:
- Puppet Enterprise 2019.8.x, 2019.7.x, 2019.5.x, 2019.4.x, 2019.3.x, 2019.2.x, 2019.1.x, 2019.0.x, 2018.1.x
- Puppet >= 5.5.8 < 7.0.0
- , , ,
Start using this module
Add this module to your Puppetfile:
mod 'puppet-caddy', '2.0.0'
Learn more about managing modules with a PuppetfileDocumentation
Puppet module for Caddy
Table of Contents
- Description
- Setup - The basics of getting started with Caddy
- Usage - Configuration options and additional functionality
- Limitations - OS compatibility, etc.
- Development - Guide for contributing to the module
Description
This module installs and configures Caddy - The HTTP/2 web server with automatic HTTPS.
Setup
What Caddy affects
- Caddy binary
- Caddy configuration file
- Caddy virtual hosts
- Caddy service
Setup Requirements
This module has the following dependencies:
Beginning with Caddy
Install Caddy without any configuration:
include caddy
Usage
Install customised version of Caddy
class { 'caddy':
caddy_features => 'http.git,http.filter,http.ipfilter',
}
Install specific version of Caddy
class { 'caddy':
version => '1.0.3',
install_method => 'github',
}
Install Caddy and configure virtual host, based on source:
caddy::vhost { 'example1':
source => 'puppet:///modules/caddy/etc/caddy/config/example1.conf',
}
Install Caddy and configure virtual host, based on content:
caddy::vhost { 'example2':
content => 'localhost:2015',
}
Reference
The reference documentation of this module is generated using puppetlabs/puppetlabs-strings.
Limitations
This module has been tested on:
- RedHat 6/7/8
- CentOS 6/7/8
- Debian 8/9/10
- Ubuntu 16.04/18.04
Development
This module has grown over time based on a range of contributions from people using it. If you follow these contributing guidelines your patch will likely make it into a release a little more quickly.
Author
This module is maintained by Vox Pupuli. It was originally written and maintained by Lukasz Rohde.
Reference
Table of Contents
Classes
Public Classes
caddy
: Main class, includes all other classes.
Private Classes
caddy::config
: This class handles the Caddy config.caddy::install
: This class handles the Caddy archive.caddy::service
: This class handles the Caddy service.
Defined types
caddy::vhost
: This defined type handles the Caddy virtual hosts.
Classes
caddy
Main class, includes all other classes.
Examples
Basic usage
include caddy
Install customised version of Caddy
class { 'caddy':
caddy_features => 'http.git,http.filter,http.ipfilter',
}
Install specific version of Caddy
class { 'caddy':
version => '1.0.3',
install_method => 'github',
}
Parameters
The following parameters are available in the caddy
class.
version
Data type: String[1]
Which version is used.
Default value: '1.0.4'
install_method
Data type: Optional[Enum['github']]
Which source is used.
Default value: undef
install_path
Data type: Stdlib::Absolutepath
Directory where the Caddy binary is stored.
Default value: '/opt/caddy'
caddy_user
Data type: String[1]
The user used by the Caddy process.
Default value: 'caddy'
caddy_group
Data type: String[1]
The group used by the Caddy process.
Default value: 'caddy'
caddy_shell
Data type: Stdlib::Absolutepath
Which shell is used.
Default value: '/sbin/nologin'
caddy_log_dir
Data type: Stdlib::Absolutepath
Directory where the log files are stored.
Default value: '/var/log/caddy'
caddy_tmp_dir
Data type: Stdlib::Absolutepath
Directory where the Caddy archive is stored.
Default value: '/tmp'
caddy_home
Data type: Stdlib::Absolutepath
Directory where the Caddy data is stored.
Default value: '/var/lib/caddy'
caddy_ssl_dir
Data type: Stdlib::Absolutepath
Directory where Let's Encrypt certificates are stored.
Default value: "/etc/ssl/caddy"
caddy_license
Data type: Enum['personal', 'commercial']
Whether a personal or commercial license is used.
Default value: 'personal'
caddy_telemetry
Data type: Enum['on','off']
Whether telemetry data should be collected.
Default value: 'off'
caddy_features
Data type: String[1]
A list of features the Caddy binary should support.
Default value: 'http.git,http.filter,http.ipfilter'
caddy_http_port
Data type: Stdlib::Port
Which port for HTTP is used.
Default value: 80
caddy_https_port
Data type: Stdlib::Port
Which port for HTTPS is used.
Default value: 443
caddy_architecture
Data type: String[1]
A temporary variable, required for the download URL.
Default value: $facts['os']['architecture']
caddy_account_id
Data type: Optional[String[1]]
The account ID, required for the commercial license.
Default value: undef
caddy_api_key
Data type: Optional[String[1]]
The API key, required for the commercial license.
Default value: undef
systemd_limit_processes
Data type: Integer[0]
The number of processes.
Default value: 64
systemd_private_devices
Data type: Boolean
Whether the process has access to physical devices.
Default value: true
systemd_capability_bounding_set
Data type: Optional[String[1]]
Controls which capabilities to include in the capability bounding set for the executed process.
Default value: undef
systemd_ambient_capabilities
Data type: Optional[String[1]]
Controls which capabilities to include in the ambient capability set for the executed process.
Default value: undef
systemd_no_new_privileges
Data type: Optional[Boolean]
Whether the process and all its children can gain new privileges through execve().
Default value: undef
Defined types
caddy::vhost
This defined type handles the Caddy virtual hosts.
Examples
Configure virtual host, based on source
caddy::vhost { 'example1':
source => 'puppet:///modules/caddy/etc/caddy/config/example1.conf',
}
Configure virtual host, based on content
caddy::vhost { 'example2:
content => 'localhost:2015',
}
Parameters
The following parameters are available in the caddy::vhost
defined type.
source
Data type: Optional[Stdlib::Filesource]
Default value: undef
content
Data type: Optional[String]
Default value: undef
Changelog
All notable changes to this project will be documented in this file. Each new release typically also includes the latest modulesync defaults. These should not affect the functionality of the module.
v2.0.0 (2020-05-14)
Breaking changes:
- Change the default values #64 (dhoppe)
- Add support for Debian 8/9/10, Ubuntu 16.04/18.04 #49 (dhoppe)
Implemented enhancements:
- Add support for stm/file_capability #46
- Update README.md #44
- Add support for assert_private() function #39
- Add support for ordering / notify arrows #38
- Add support for puppetlabs/puppet-strings #33
- Add support for latest available releases #32
- Add support for Hiera #31
- Add support for puppet/archive #30
- Add support for camptocamp/systemd #29
- Migrate from .erb to .epp templates #61 (dhoppe)
- Add support for a specific version #60 (dhoppe)
- Support Redhat 8 #35 (qs5779)
Closed issues:
- Support a specific version #59
- Migrate from .erb to .epp templates #55
- Change the default values #54
- Reduce number of duplicate parameters #40
- Improve RSpec tests #37
Merged pull requests:
- Fix typo #52 (dhoppe)
- Fix README.md #51 (dhoppe)
- Add support for stm/file_capability #47 (dhoppe)
- Add support for puppet/archive #45 (dhoppe)
- Refactor Puppet manifests #43 (dhoppe)
- Move resources to related classes #42 (dhoppe)
- Reduce number of duplicate parameters #41 (dhoppe)
- Improve the RSpec tests #36 (dhoppe)
v1.0.0 (2020-04-24)
Breaking changes:
- modulesync 2.7.0 and drop puppet 4 #16 (bastelfreak)
Closed issues:
- Migrate caddy module to Vox Pupuli #2
Merged pull requests:
- Use voxpupuli-acceptance #25 (ekohl)
- update repo links to https #23 (bastelfreak)
- Allow puppetlabs/stdlib 6.x #22 (dhoppe)
- modulesync 2.6.0 #15 (dhoppe)
- Fix typo at documentation #14 (dhoppe)
v0.2.0 (2018-12-28)
Breaking changes:
Implemented enhancements:
- alternative HTTP/S ports, fix download commercial license, alternativ… #12 (bastelfreak)
Merged pull requests:
- modulesync 2.1.0 and allow puppet 6.x #7 (bastelfreak)
- Fix typo in README.md #6 (ekohl)
- Fix Markdown syntax #4 (dhoppe)
v0.1.2 (2017-01-24)
v0.1.1 (2017-01-12)
0.1.0 (2017-01-12)
* This Changelog was automatically generated by github_changelog_generator
Dependencies
- camptocamp/systemd (>= 2.9.0 < 3.0.0)
- puppet/archive (>= 4.4.0 < 5.0.0)
- puppetlabs/stdlib (>= 4.25.0 < 7.0.0)
- stm/file_capability (>= 3.0.0 < 4.0.0)
MIT License Copyright (c) 2016 Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.