Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
mcorbin committed Apr 27, 2016
1 parent 0854802 commit 71b6008
Showing 1 changed file with 47 additions and 2 deletions.
49 changes: 47 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,51 @@

Launch Goss (https://github.com/aelsabbahy/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) :

```yaml
- name: test goss file
goss:
path: "/path/to/file.yml"
```
If a test fail, the module return 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 in a format supported by goss with the option **format** :
```yaml
- name: test goss file
goss:
path: "/path/to/file.yml"
format: json
```
You can save the output of the goss command in a file with the option **output_file**:
```yaml
- 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. Actually, this module always return **changed = False**, even with the **output_file** option.
## Module documentation
```yaml

description:
Expand All @@ -15,8 +60,8 @@ options:
format:
required: false
description:
- change the output goss format.
- Goss format list : goss v --format => [documentation json junit nagios rspecish tap].
- change the output goss format.
- Goss format list : goss v --format => [documentation json junit nagios rspecish tap].
- Default: None
output_file:
required: false
Expand Down

0 comments on commit 71b6008

Please sign in to comment.