Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/skyscrapers/puppet-caddy
Puppet module to setup Caddy web server
https://github.com/skyscrapers/puppet-caddy
caddy letsencrypt puppet puppet-module ssl
Last synced: 3 months ago
JSON representation
Puppet module to setup Caddy web server
- Host: GitHub
- URL: https://github.com/skyscrapers/puppet-caddy
- Owner: skyscrapers
- License: mit
- Created: 2016-11-22T13:32:05.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2023-01-19T13:16:28.000Z (about 2 years ago)
- Last Synced: 2023-08-01T06:57:46.421Z (over 1 year ago)
- Topics: caddy, letsencrypt, puppet, puppet-module, ssl
- Language: Puppet
- Size: 38.1 KB
- Stars: 2
- Watchers: 6
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# puppet-caddy
## Description
Puppet module to setup Caddy web server
## Setup
### Requirements
This module has the following module dependencies:
- archive: https://forge.puppet.com/puppet/archive
- concat: https://forge.puppet.com/puppetlabs/concat
- stdlib: https://forge.puppet.com/puppetlabs/stdlib## Usage
In order to use the caddy module, just include it in your manifest. You can configure everything from hiera.
To configure the caddy module, just take a look at the parameters in [`manifests/init.pp`](manifests/init.pp).
To setup a server / virtual host, you have to define a `caddy::servers` hiera hash, where the keys of the hash are the server addresses, and the parameters are:
- `port` (optional): the server will be listening to this port
- `directives` (optional): all the specific directives that the server have to contain.Take a look at the [Caddyfile documentation](https://caddyserver.com/docs/caddyfile), to know how the server address can be specified, and to have more information on all the directives that can be specified.
### Example
In your puppet code:
```
node default {
include ::caddy
}
```In hiera data:
```yaml
---
caddy::servers:
'www.caddy.com':
directives:
log: 'stdout'
gzip: ''
'markdown /blog':
css: '/blog.css'
js: '/scripts.js'```
For setups managed by `systemd`, try to use `log stdout` and `errors stderr` as much as possible for the logs to end up in `journald`.
With `journalctl` it is quite easy to search for specific log entries in a unified way.E.g. search for LetsEncrypt rate limiting messages in the last 5 days:
`$ journalctl -u caddy -p err --since "5 days ago"`