All Projects → indusbox → Goss Ansible

indusbox / Goss Ansible

Licence: mit
Ansible module for Goss

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Goss Ansible

Pytest Testinfra
With Testinfra you can write unit tests in Python to test actual state of your servers configured by management tools like Salt, Ansible, Puppet, Chef and so on.
Stars: ✭ 1,987 (+1774.53%)
Mutual labels:  ansible, infrastructure-as-code
Oneview Ansible
Ansible Modules and Sample Playbooks for HPE OneView
Stars: ✭ 96 (-9.43%)
Mutual labels:  ansible, infrastructure-as-code
Kitchen Ansiblepush
test-kitchen plugin to use ansible in push mode
Stars: ✭ 38 (-64.15%)
Mutual labels:  ansible, infrastructure-as-code
Infrastructure As Code Tutorial
Infrastructure As Code Tutorial. Covers Packer, Terraform, Ansible, Vagrant, Docker, Docker Compose, Kubernetes
Stars: ✭ 1,954 (+1743.4%)
Mutual labels:  ansible, infrastructure-as-code
Terrible
An Ansible playbook that apply the principle of the Infrastructure as Code on a QEMU/KVM environment.
Stars: ✭ 161 (+51.89%)
Mutual labels:  ansible, infrastructure-as-code
Tads Boilerplate
Terraform + Ansible + Docker Swarm boilerplate = DevOps on 🔥🔥🔥 | Infrastructure as Code
Stars: ✭ 424 (+300%)
Mutual labels:  ansible, infrastructure-as-code
Kubernetes The Ansible Way
Bootstrap Kubernetes the Ansible way on Everything (here: Vagrant). Inspired by Kelsey Hightower´s kubernetes-the-hard-way, but refactored to Infrastructure-as-Code.
Stars: ✭ 82 (-22.64%)
Mutual labels:  ansible, infrastructure-as-code
Drupal Vm
A VM for Drupal development
Stars: ✭ 1,348 (+1171.7%)
Mutual labels:  ansible
Esbuild Jest
A Jest transformer using esbuild
Stars: ✭ 100 (-5.66%)
Mutual labels:  test
Ntf
Network Testing Framework
Stars: ✭ 96 (-9.43%)
Mutual labels:  test
Beetbox
Pre-provisioned L*MP stack
Stars: ✭ 94 (-11.32%)
Mutual labels:  ansible
Yams
A collection of Ansible roles for automating infosec builds.
Stars: ✭ 98 (-7.55%)
Mutual labels:  ansible
Ansible Postfix
Ansible role to set up postfix in Debian-like systems
Stars: ✭ 102 (-3.77%)
Mutual labels:  ansible
Spek
🎏 Function builder BDD testing framework in Swift
Stars: ✭ 104 (-1.89%)
Mutual labels:  test
Awx Ha Instancegroup
Build AWX clustering on Docker Standalone Installation
Stars: ✭ 106 (+0%)
Mutual labels:  ansible
Community.vmware
Ansible Collection for VMWare
Stars: ✭ 104 (-1.89%)
Mutual labels:  ansible
Vagrant Box Templates
Stars: ✭ 100 (-5.66%)
Mutual labels:  ansible
Spincycle
Automate and expose complex infrastructure tasks to teams and services.
Stars: ✭ 95 (-10.38%)
Mutual labels:  infrastructure-as-code
Cize
🔌 Continuous integration with the simplest solution
Stars: ✭ 100 (-5.66%)
Mutual labels:  test
Gltf Asset Generator
Tool for generating various glTF assets for importer validation
Stars: ✭ 103 (-2.83%)
Mutual labels:  test

ansible-goss

Launch Goss test file with Ansible.

Installation

Copy the goss.py file into your Ansible library directory. That's it!

Quick start

Simple example

Validate a Goss test file (the test file must be on the remote machine):

- name: test goss file
  goss:
    path: "/path/to/file.yml"

If a test fails, the module returns an error. If you want to ignore this error, add ignore_errors: yes on the task.

Output format and output file

You can change the output format with the format option:

- name: test goss file
  goss:
    path: "/path/to/file.yml"
    format: json

See all the supported output format: https://github.com/aelsabbahy/goss#supported-output-formats

You can also save the output of the goss command in a file with the output_file option:

- name: test goss file
  goss:
    path: "/path/to/file.yml"
    format: json
    output_file : /my/output/file.json

Changed = False

We use this module for testing/validation purposes. Therefore, this module always returns changed = false, even with the output_file option.

Ansible versions

Tested with :

  • Ansible 1.8.2
  • Ansible 2.0.2
  • Ansible 2.2.2

Module documentation

module: goss
author: Mathieu Corbin
short_description: Launch goss (https://github.com/aelsabbahy/goss) tests
description:
  - Launch goss tests.
    This module always returns `changed = false` for idempotence.
options:
  path:
    required: true
    description:
      - Test file to validate.
        The test file must be on the remote machine.
  goss_path:
    required: false
    description:
      - Path location for the goss executable.
        Default is "goss" (ie.`no absolute path,  goss executable must be available in $PATH).
  format:
    required: false
    description:
      - Output goss format.
        Goss format list : goss v --format => [documentation json junit nagios nagios_verbose rspecish tap silent].
        Default is "rspecish".
  output_file:
    required: false
    description:
      - Save the result of the goss command in a file whose path is output_file

examples:
  - name: run goss against the gossfile /path/to/file.yml
    goss:
      path: "/path/to/file.yml"

  - name: run goss against the gossfile /path/to/file.yml with nagios output
    goss:
      path: "/path/to/file.yml"
      format: "nagios"

  - name: run /usr/local/bin/goss against the gossfile /path/to/file.yml
    goss:
      path: "/path/to/file.yml"
      goss_path: "/usr/local/bin/goss"

  - name: run goss against multiple gossfiles and write the result in JSON format to /my/output/ for each file
    goss:
      path: "{{ item }}"
      format: json
      output_file : /my/output/{{ item }}
    with_items: "{{ goss_files }}"
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].