{"id":13647413,"url":"https://github.com/indusbox/goss-ansible","last_synced_at":"2025-04-22T02:31:33.331Z","repository":{"id":51083519,"uuid":"56133729","full_name":"indusbox/goss-ansible","owner":"indusbox","description":"Ansible module for Goss","archived":false,"fork":false,"pushed_at":"2023-10-14T09:20:42.000Z","size":24,"stargazers_count":132,"open_issues_count":2,"forks_count":15,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-11-09T21:36:44.542Z","etag":null,"topics":["ansible","goss","infrastructure-as-code","test"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/indusbox.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2016-04-13T08:18:07.000Z","updated_at":"2024-11-09T02:36:18.000Z","dependencies_parsed_at":"2023-10-15T09:44:36.823Z","dependency_job_id":null,"html_url":"https://github.com/indusbox/goss-ansible","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/indusbox%2Fgoss-ansible","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/indusbox%2Fgoss-ansible/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/indusbox%2Fgoss-ansible/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/indusbox%2Fgoss-ansible/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/indusbox","download_url":"https://codeload.github.com/indusbox/goss-ansible/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250163659,"owners_count":21385282,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ansible","goss","infrastructure-as-code","test"],"created_at":"2024-08-02T01:03:32.948Z","updated_at":"2025-04-22T02:31:33.076Z","avatar_url":"https://github.com/indusbox.png","language":"Python","funding_links":[],"categories":["test","Python"],"sub_categories":[],"readme":"\n# ansible-goss\n\n[![CI](https://github.com/indusbox/goss-ansible/actions/workflows/ci.yml/badge.svg)](https://github.com/indusbox/goss-ansible/actions/workflows/ci.yml)\n\nLaunch [Goss](https://github.com/aelsabbahy/goss) test file with Ansible.\n\n## Installation\n\nCopy the `goss.py` file into your Ansible `library` directory. That's it!\n\n## Quick start\n\n### Simple example\n\nValidate a Goss test file (the test file must be on the remote machine):\n\n```yaml\n- name: test goss file\n  goss:\n    path: \"/path/to/file.yml\"\n```\n\nIf a test fails, the module returns an error.\nIf you want to ignore this error, add `ignore_errors: yes` on the task.\n\n### Output format and output file\n\nYou can change the output format with the `format` option:\n\n```yaml\n- name: test goss file\n  goss:\n    path: \"/path/to/file.yml\"\n    format: json\n```\n\nSee all the supported output format: https://github.com/aelsabbahy/goss#supported-output-formats\n\nYou can also save the output of the `goss` command in a file with the `output_file` option:\n\n```yaml\n- name: test goss file\n  goss:\n    path: \"/path/to/file.yml\"\n    format: json\n    output_file : /my/output/file.json\n```\n\n### Changed = False\n\nWe use this module for testing/validation purposes.\nTherefore, this module always returns `changed = false`, even with the `output_file` option.\n\n## Ansible versions\n\nTested with :\n\n- Ansible 1.8.2\n- Ansible 2.0.2\n- Ansible 2.2.2\n\n## Module documentation\n\n```yaml\nmodule: goss\nauthor: Mathieu Corbin\nshort_description: Launch goss (https://github.com/aelsabbahy/goss) tests\ndescription:\n  - Launch goss tests.\n    This module always returns `changed = false` for idempotence.\noptions:\n  path:\n    required: true\n    description:\n      - Test file to validate.\n        The test file must be on the remote machine.\n  goss_path:\n    required: false\n    description:\n      - Path location for the goss executable.\n        Default is \"goss\" (ie.`no absolute path,  goss executable must be available in $PATH).\n  format:\n    required: false\n    description:\n      - Output goss format.\n        Goss format list : goss v --format =\u003e [documentation json junit nagios nagios_verbose rspecish tap silent].\n        Default is \"rspecish\".\n  output_file:\n    required: false\n    description:\n      - Save the result of the goss command in a file whose path is output_file\n\nexamples:\n  - name: run goss against the gossfile /path/to/file.yml\n    goss:\n      path: \"/path/to/file.yml\"\n\n  - name: run goss against the gossfile /path/to/file.yml with nagios output\n    goss:\n      path: \"/path/to/file.yml\"\n      format: \"nagios\"\n\n  - name: run /usr/local/bin/goss against the gossfile /path/to/file.yml\n    goss:\n      path: \"/path/to/file.yml\"\n      goss_path: \"/usr/local/bin/goss\"\n\n  - name: run goss against multiple gossfiles and write the result in JSON format to /my/output/ for each file\n    goss:\n      path: \"{{ item }}\"\n      format: json\n      output_file : /my/output/{{ item }}\n    with_items: \"{{ goss_files }}\"\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Findusbox%2Fgoss-ansible","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Findusbox%2Fgoss-ansible","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Findusbox%2Fgoss-ansible/lists"}