{"id":13753140,"url":"https://github.com/AnsibleCheck/ansiblecheck","last_synced_at":"2025-05-09T20:34:54.119Z","repository":{"id":94255099,"uuid":"72868955","full_name":"AnsibleCheck/ansiblecheck","owner":"AnsibleCheck","description":"One Stop Solution For Checking Your Ansible Roles and Playbooks","archived":false,"fork":false,"pushed_at":"2020-03-13T13:43:19.000Z","size":91,"stargazers_count":55,"open_issues_count":4,"forks_count":7,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-04-10T21:34:28.426Z","etag":null,"topics":["ansible","ansible-playbooks","ansible-roles","continuous-integration","docker","testing"],"latest_commit_sha":null,"homepage":"","language":"Dockerfile","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/AnsibleCheck.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-11-04T17:12:33.000Z","updated_at":"2023-09-19T01:46:56.000Z","dependencies_parsed_at":"2023-07-27T12:15:25.978Z","dependency_job_id":null,"html_url":"https://github.com/AnsibleCheck/ansiblecheck","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AnsibleCheck%2Fansiblecheck","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AnsibleCheck%2Fansiblecheck/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AnsibleCheck%2Fansiblecheck/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AnsibleCheck%2Fansiblecheck/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AnsibleCheck","download_url":"https://codeload.github.com/AnsibleCheck/ansiblecheck/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253321826,"owners_count":21890474,"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","ansible-playbooks","ansible-roles","continuous-integration","docker","testing"],"created_at":"2024-08-03T09:01:16.936Z","updated_at":"2025-05-09T20:34:49.085Z","avatar_url":"https://github.com/AnsibleCheck.png","language":"Dockerfile","readme":"AnsibleCheck\n=============\n\n[![Build Status](https://travis-ci.org/AnsibleCheck/ansiblecheck.svg?branch=master)](https://travis-ci.org/AnsibleCheck/ansiblecheck) [![GitHub issues](https://img.shields.io/github/issues/ansiblecheck/ansiblecheck.svg)](https://github.com/AnsibleCheck/ansiblecheck)   [![Docker Automated build](https://img.shields.io/docker/automated/ansiblecheck/ansiblecheck.svg?maxAge=2592000)](https://hub.docker.com/r/ansiblecheck/ansiblecheck/) [![Docker Pulls](https://img.shields.io/docker/pulls/ansiblecheck/ansiblecheck.svg)](https://hub.docker.com/r/ansiblecheck/ansiblecheck/) [![Join the chat at https://gitter.im/AnsibleCheck/ansiblecheck](https://badges.gitter.im/AnsibleCheck/ansiblecheck.svg)](https://gitter.im/AnsibleCheck/ansiblecheck?utm_source=badge\u0026utm_medium=badge\u0026utm_campaign=pr-badge\u0026utm_content=badge)\n\nA One Stop Solution For Checking Your Ansible Roles and Playbooks.\n\n### Docker Images\n\n*   [```ubuntu-16.04```, ```ubuntu-xenial``` (*ubuntu-xenial/Dockerfile*)](https://github.com/AnsibleCheck/ansiblecheck/blob/master/core/Ubuntu/xenial/Dockerfile)\n*   [```ubuntu-18.04```, ```ubuntu-bionic``` (*ubuntu-bionic/Dockerfile*)](https://github.com/AnsibleCheck/ansiblecheck/blob/master/core/Ubuntu/bionic/Dockerfile)\n*   [```debian-10```, ```debian-buster``` (*debian-buster/Dockerfile*)](https://github.com/AnsibleCheck/ansiblecheck/blob/master/core/Debian/buster/Dockerfile)\n*   [```debian-9```, ```debian-stretch``` (*debian-stretch/Dockerfile*)](https://github.com/AnsibleCheck/ansiblecheck/blob/master/core/Debian/stretch/Dockerfile)\n*   [```debian-8```, ```debian-jessie``` (*debian-jessie/Dockerfile*)](https://github.com/AnsibleCheck/ansiblecheck/blob/master/core/Debian/jessie/Dockerfile)\n*   [```centos-7```, ```el-7```  (*el-7/Dockerfile*)](https://github.com/AnsibleCheck/ansiblecheck/blob/master/core/EL/7/Dockerfile)\n*   [```centos-6```, ```el-6```  (*el-6/Dockerfile*)](https://github.com/AnsibleCheck/ansiblecheck/blob/master/core/EL/6/Dockerfile)\n*   [```fedora-24``` (*fedora-24/Dockerfile*)](https://github.com/AnsibleCheck/ansiblecheck/blob/master/core/Fedora/24/Dockerfile)\n*   [```archlinux-latest``` (*archlinux-latest/Dockerfile*)](https://github.com/AnsibleCheck/ansiblecheck/blob/master/core/ArchLinux/latest/Dockerfile)\n*   [```oraclelinux-7```, ```oraclelinux-7.3``` (*oraclelinux-7.3/Dockerfile*)](https://github.com/AnsibleCheck/ansiblecheck/blob/master/core/OracleLinux/7.3/Dockerfile)\n*   [```oraclelinux-6```, ```oraclelinux-6.8``` (*oraclelinux-6.8/Dockerfile*)](https://github.com/AnsibleCheck/ansiblecheck/blob/master/core/OracleLinux/6.8/Dockerfile)\n*   [```opensuse-42.2``` ```opensuse-leap``` (*opensuse-42.2/Dockerfile*)](https://github.com/AnsibleCheck/ansiblecheck/blob/master/core/opensuse/42.2/Dockerfile)\n\n### General Principles\n\nAnsibleCheck utilizes Docker to deploy test boxes with Ansible built into the\nimages. By then loading your generated roles into these docker instances\nyou can check to insure compliance with the platforms that you claim your\nrole supports.\n\nIn this project we utilize the same naming conventions that are offered in\nan Ansible galaxy project as well as more standard conventions by secondary tags.\n\nDiffering platforms have differing initialization scripts. None of these images\nare intended for production use. They are entirely built for the purpose of\ntesting Ansible roles and playbooks.\n\nIf this is intended for automated testing, then travis builds are highly preferable\nbecause they allow you to demonstrate on your galaxy role that it can actually\nsupport the operating systems you claim to support.\n\n### How To Use\n\n#### Travis-CI\n\nTo get started with travis-ci take a look at the examples in the docs. At the\nend of this section will be a complete list of supported environment combinations\nto generate valid travis builds of your roles.\nHowever ```distribution``` and ```distribution_version``` will be primarily\nmatching the full list of Operating systems by ansible galaxy that is at the\nvery bottom of this document.\n\nBasically build your role and depending on how you would like to test your [role](docs/examples/simple) or [playbook](docs/examples/simple-playbook),\neither simply or with multiple tests or with [extra variables](docs/examples/with-variables)\n to assess whether your role/playbook runs as expected under all conditions.\n\n#### Manually\n\n1.  [Install Docker](https://docs.docker.com/engine/installation/)\n2.  Pull the desired image/images from Docker Hub. These images are tags that\nare in all lower case.\n\n```shell\ndocker pull ansiblecheck/ansiblecheck:ubuntu-xenial\n```\n\n3.  Run a container from the image and mount the role/playbook into the image.\nCheck run_opts and init for the travis build\n\n```shell\ndocker run --detach --volume=\"${PWD}\":/etc/ansible/roles/role_under_test:ro \\\n--privileged \\\n--volume=/sys/fs/cgroup:/sys/fs/cgroup:ro ansiblecheck/ansiblecheck:ubuntu-xenial \\\n/usr/lib/systemd/systemd\n```\n\n4.  Finally Utilize Ansible Inside of the Container Space To See That The Role\nfunctions correctly.\n\n```shell\ndocker exec --tty \"${container_id}\" env TERM=xterm ansible-playbook \\\n /etc/ansible/roles/role_under_test/tests/test.yml --syntax-check\n```\n\n```shell\ndocker exec \"$(cat ${container_id})\" ansible-playbook \\\n /etc/ansible/roles/role_under_test/tests/test.yml\n```\n\n### AnsibleCheck Configurations\n\nYou can comment out an environment with # on each line of the list item.\n\n```yaml\n- distribution: Ubuntu\n  distribution_version: bionic\n  init: /lib/systemd/systemd\n  run_opts: \"--privileged --volume=/sys/fs/cgroup:/sys/fs/cgroup:ro\"\n- distribution: Ubuntu\n  distribution_version: xenial\n  init: /lib/systemd/systemd\n  run_opts: \"--privileged --volume=/sys/fs/cgroup:/sys/fs/cgroup:ro\"\n- distribution: EL\n  distribution_version: \"7\"\n  init: /usr/lib/systemd/systemd\n  run_opts: \"--privileged --volume=/sys/fs/cgroup:/sys/fs/cgroup:ro\"\n- distribution: EL\n  distribution_version: \"6\"\n  init: /sbin/init\n  run_opts: \"\"\n- distribution: Debian\n  distribution_version: buster\n  init: /lib/systemd/systemd\n  run_opts: \"--privileged --volume=/sys/fs/cgroup:/sys/fs/cgroup:ro\"\n- distribution: Debian\n  distribution_version: stretch\n  init: /lib/systemd/systemd\n  run_opts: \"--privileged --volume=/sys/fs/cgroup:/sys/fs/cgroup:ro\"\n- distribution: Debian\n  distribution_version: jessie\n  init: /lib/systemd/systemd\n  run_opts: \"--privileged --volume=/sys/fs/cgroup:/sys/fs/cgroup:ro\"\n- distribution: Fedora\n  distribution_version: \"24\"\n  init: /usr/lib/systemd/systemd\n  run_opts: \"--privileged --volume=/sys/fs/cgroup:/sys/fs/cgroup:ro\"\n```\n\n### Ansible Galaxy Configurations\n\n```yaml\nplatforms:\n  - name: OpenBSD\n    versions:\n      - all\n      - 5.6\n      - 5.7\n      - 5.8\n      - 5.9\n      - 6.0\n  - name: Fedora\n    versions:\n      - all\n     - 16\n     - 17\n     - 18\n     - 19\n     - 20\n     - 21\n     - 22\n     - 23\n     - 24\n  - name: DellOS\n    versions:\n      - all\n      - 10\n      - 6\n      - 9\n  - name: MacOSX\n    versions:\n      - all\n      - 10.10\n      - 10.11\n      - 10.12\n      - 10.7\n      - 10.8\n      - 10.9\n  - name: Junos\n    versions:\n      - all\n      - any\n  - name: GenericBSD\n    versions:\n      - all\n      - any\n  - name: Void Linux\n    versions:\n      - all\n      - any\n  - name: GenericLinux\n    versions:\n      - all\n      - any\n  - name: NXOS\n    versions:\n      - all\n      - any\n  - name: IOS\n    versions:\n      - all\n      - any\n  - name: Amazon\n    versions:\n      - all\n      - 2013.03\n      - 2013.09\n      - 2016.03\n  - name: ArchLinux\n    versions:\n      - all\n      - any\n  - name: FreeBSD\n    versions:\n      - all\n      - 10.0\n      - 10.1\n      - 10.2\n      - 10.3\n      - 8.0\n      - 8.1\n      - 8.2\n      - 8.3\n      - 8.4\n      - 9.0\n      - 9.1\n      - 9.1\n      - 9.2\n      - 9.3\n  - name: Ubuntu\n    versions:\n      - all\n      - lucid\n      - maverick\n      - natty\n      - oneiric\n      - precise\n      - quantal\n      - raring\n      - saucy\n      - trusty\n      - utopic\n      - vivid\n      - wily\n      - xenial\n      - bionic\n  - name: Debian\n    versions:\n      - jessie\n      - buster\n      - stretch\n  - name: EL\n    versions:\n      - all\n      - 5\n      - 6\n      - 7\n  - name: Windows\n    versions:\n      - all\n      - 2012R2\n  - name: SmartOS\n    versions:\n      - all\n      - any\n  - name: opensuse\n    versions:\n      - all\n      - 12.1\n      - 12.2\n      - 12.3\n      - 13.1\n      - 13.2\n  - name: SLES\n    versions:\n      - all\n      - 10SP3\n      - 10SP4\n      - 11\n      - 11SP1\n      - 11SP2\n      - 11SP3\n      - 11SP4\n      - 12\n      - 12SP1\n  - name: GenericUNIX\n    versions:\n      - all\n      - any\n  - name: Solaris\n    versions:\n      - all\n      - 10\n      - 11.0\n      - 11.1\n      - 11.2\n      - 11.3\n  - name: eos\n    versions:\n      - all\n      - Any\n```\n\n#### Projects Using AnsibleCheck\n\nSubmit a pull request to add your project to the list.\n\n*   [carlosbuenosvinos.ansistrano-deploy](https://galaxy.ansible.com/carlosbuenosvinos/ansistrano-deploy/)\n*   [ChristopherDavenport.universal-java](https://galaxy.ansible.com/ChristopherDavenport/universal-java/)\n*   [ChristopherDavenport.universal-oracle-client](https://galaxy.ansible.com/ChristopherDavenport/universal-oracle-client/)\n*   [ChristopherDavenport.icu](https://galaxy.ansible.com/ChristopherDavenport/icu/)\n*   [ChristopherDavenport.gnu-cobol](https://galaxy.ansible.com/ChristopherDavenport/gnu-cobol/)\n*   [eNiXHosting](https://galaxy.ansible.com/eNiXHosting/)\n\n#### Attribution\n\nA significant piece of the base work came from groundwork laid out\nby [geerlingguy](https://github.com/geerlingguy) for testing his own roles\ninternally. Now hopefully we can all work towards building better roles where\nwe are certain of the functionality they provide on multiple systems\n","funding_links":[],"categories":["testing"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FAnsibleCheck%2Fansiblecheck","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FAnsibleCheck%2Fansiblecheck","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FAnsibleCheck%2Fansiblecheck/lists"}