maxhoesel.caddy.caddy_config_info module – Get the current Caddy configuration for a given path
Note
This module is part of the maxhoesel.caddy collection (version 1.1.0).
To install it, use: ansible-galaxy collection install maxhoesel.caddy.
You need further requirements to be able to use this module,
see Requirements for details.
To use it in a playbook, specify: maxhoesel.caddy.caddy_config_info.
New in maxhoesel.caddy 0.1.0
Synopsis
Returns the currently running configuration for any given path
Requirements
The below requirements are needed on the host that executes this module.
requestsmust be installed on the host executing the query
Parameters
Parameter |
Comments |
|---|---|
Address of the caddy API endpoint Default: |
|
Path from which the configuration content will be read. Note that |
Examples
- name: Get config for an HTTP server
maxhoesel.caddy.caddy_config_info:
path: apps/http/servers/myserver
register: myserver_cfg
- debug:
msg: "{{ myserver_cfg.config }}"
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
|---|---|
Configuration at the requested path as a mapping/list Returned: success |