maxhoesel / maxhoesel.caddy / 1.1.0 / module / caddy_load Load a new configuration into Caddy | "added in version" 0.1.0 of maxhoesel.caddy" Authors: Max Hösel (@maxhoesel)maxhoesel.caddy.caddy_load (1.1.0) — module
Install with ansible-galaxy collection install maxhoesel.caddy:==1.1.0
collections: - name: maxhoesel.caddy version: 1.1.0
This module pushes a caddy configuration to the server via the C(/load) API endpoint. If no change between the currently running and future configuration is found, no changes will be made.
- name: Load Caddy config maxhoesel.caddy.caddy_load: content: apps: http: servers: example: listen: - ":80" routes: - handle: - handler: "static_response" body: "Hello, world!"
force: default: false description: 'By default, this module only pushes configurations if changes have been made compared to the currently running config. Set I(force=True) if you always want to push the configuration, even if no changes will be made. Settings this will cause the module to always return C(changed=True) ' type: bool content: aliases: - config - value description: Configuration for caddy. Needs to be a mapping corresponding to the API JSON format. type: raw caddy_host: default: http://localhost:2019 description: Address of the caddy API endpoint type: str