mschuchard / mschuchard.general / 1.0.1 / module / goss_serve Module to serve a GoSS health endpoint. | "added in version" 1.0.0 of mschuchard.general" Authors: Matthew Schuchard (@mschuchard)mschuchard.general.goss_serve (1.0.1) — module
Install with ansible-galaxy collection install mschuchard.general:==1.0.1
collections: - name: mschuchard.general version: 1.0.1
Serve a GoSS health endpoint for validating systems.
# serve a health endpoint with a gossfile at /path/to/my_gossfile.yaml - name: Serve a health endpoint with a gossfile at /path/to/my_gossfile.yaml mschuchard.general.goss_serve: gossfile: /path/to/my_gossfile.yaml
# serve a health endpoint with a default location gossfile, a var file at /path/to/vars.yaml, and a json format output - name: Serve a health endpoint with a default location gossfile, a var file at /path/to/vars.yaml, and a pretty json format output mschuchard.general.goss_serve: format: json format_opts: pretty vars: /path/to/vars.yaml
# serve a health endpoint with a default location gossfile at localhost:8765/check and cache the results for one minute - name: Serve a health endpoint with a default location gossfile at localhost:8765/check and cache the results for one minute mschuchard.general.goss_serve: cache: 1m endpoint: /check port: 8765
# serve a health endpoint with a default location gossfile and its corresponding golang template with inline variables and rpm package - name: Serve a health endpoint with a default location gossfile and its corresponding golang template with inline variables and rpm package mschuchard.general.goss_serve: package: rpm vars_inline: my_service: httpd my_package: apache
port: default: 8080 description: Address to listen on. required: false type: int vars: description: Path to YAMl or JSON format file containing variables for template. required: false type: bool cache: default: 5s description: Time to cache the results required: false type: str format: default: rspecish description: Output format for validation report. required: false type: str package: description: The package type to use. required: false type: str endpoint: default: /healthz description: Endpoint to expose. required: false type: str gossfile: default: goss.yaml description: The specific gossfile used for serveing the output. required: false type: str max_concur: default: 50 description: Max number of tests to run concurrently required: false type: int format_opts: description: Extra options passed to the formatter. Valid options are perfdata, pretty, or verbose. required: false type: str vars_inline: description: Variables for the template. required: false type: dict
command: description: The raw GoSS command executed by Ansible. returned: always type: str