mschuchard.general.goss_render (1.0.1) — module

Module to render a single valid gossfile.

| "added in version" 1.0.0 of mschuchard.general"

Authors: Matthew Schuchard (@mschuchard)

Install collection

Install with ansible-galaxy collection install mschuchard.general:==1.0.1


Add to requirements.yml

  collections:
    - name: mschuchard.general
      version: 1.0.1

Description

Render a single valid parsed JSON/YAML gossfile.


Requirements

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
# render a gossfile at /path/to/my_gossfile.yaml
- name: Render a gossfile at /path/to/my_gossfile.yaml
  mschuchard.general.goss_render:
    gossfile: /path/to/my_gossfile.yaml
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
# render a default location gossfile and its corresponding golang template with debug enabled
- name: Render a default location gossfile and its corresponding golang template with debug enabled
  mschuchard.general.goss_render:
    debug: true
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
# render a default location gossfile and its corresponding golang template with inline variables
- name: Render a default location gossfile and its corresponding golang template with inline variables
  mschuchard.general.goss_render:
    vars_inline:
      my_service: httpd
      my_package: apache

Inputs

    
vars:
    description: Path to YAMl or JSON format file containing variables for template.
    required: false
    type: bool

debug:
    default: false
    description: Additionally render the golang template prior to rendering the gossfile.
    required: false
    type: bool

package:
    description: The package type to use.
    required: false
    type: str

gossfile:
    default: goss.yaml
    description: The specific gossfile used for rendering the output.
    required: false
    type: str

vars_inline:
    description: Variables for the template.
    required: false
    type: dict

Outputs

command:
  description: The raw GoSS command executed by Ansible.
  returned: always
  type: str