{"id":13647473,"url":"https://github.com/nylas/ansible-test","last_synced_at":"2025-04-22T02:31:56.703Z","repository":{"id":53671047,"uuid":"36465798","full_name":"nylas/ansible-test","owner":"nylas","description":"An Ansible Testing Framework for Humans","archived":false,"fork":false,"pushed_at":"2021-03-19T21:52:49.000Z","size":22,"stargazers_count":172,"open_issues_count":8,"forks_count":28,"subscribers_count":52,"default_branch":"master","last_synced_at":"2024-08-03T01:37:02.305Z","etag":null,"topics":[],"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/nylas.png","metadata":{"files":{"readme":"README.rst","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}},"created_at":"2015-05-28T20:59:12.000Z","updated_at":"2024-04-12T20:47:43.000Z","dependencies_parsed_at":"2022-09-13T17:14:23.376Z","dependency_job_id":null,"html_url":"https://github.com/nylas/ansible-test","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/nylas%2Fansible-test","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nylas%2Fansible-test/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nylas%2Fansible-test/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nylas%2Fansible-test/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nylas","download_url":"https://codeload.github.com/nylas/ansible-test/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223887624,"owners_count":17219964,"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":[],"created_at":"2024-08-02T01:03:35.244Z","updated_at":"2024-11-09T21:30:45.596Z","avatar_url":"https://github.com/nylas.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"ansible-test: Ansible Local Testing Framework\n=============================================\n\nAnsible-test is a tool for testing your automation on local docker images. You can think of this as a slim version of Chef's test-kitchen.\n\n.. code-block:: bash\n\n   $ cd /my/ansible/repository\n   $ ansible-test my_ansible_role\n\nThe above command will drop a Dockerfile at the root of your ansible repo and initialize a docker image with ansible installed. It will then run the ansible role \"my_ansible_role\".\n\nNote that ansible-test also accepts arbitrary arguments. These arguments will be passed on to the ansible-playbook command while running tests:\n\n.. code-block:: bash\n\n   ansible-test my_ansible_role --ask-vault-pass\n\n\nAnsible test also accepts an image argument to specify the base docker image:\n\n.. code-block:: bash\n\n   ansible-test my_ansible_role --image ubuntu:latest\n\nSee the `example ansible flask project \u003chttps://github.com/nylas/ansible-flask-example\u003e`_, which tests with ansible-test out-of-the-box\n\nInstallation\n------------\n\nTo install ansible-test:\n\n.. code-block:: bash\n\n   $ pip install ansible-test\n\nDocumentation\n-------------\n\nansible-test requires that you have docker installed locally. If you are using Mac OSX, I recommend you use boot2docker.\n\nNOTE: Given docker's inflexibility with Dockerfiles, ansible-test will overwrite the Dockerfile in the current working directory from which you run ansible-test. This is currently the simplest way to integrate docker as a testing tool.\n\nUsage\n~~~~~\n\n.. code-block:: bash\n\n   usage: ansible-test [-h] [--image IMAGE] [--family {Debian,RedHat,Gentoo}]\n                       role\n\n   positional arguments:\n     role                  Role to test\n\n   optional arguments:\n     -h, --help            show this help message and exit\n     --image IMAGE, -i IMAGE\n                           Docker Base Image\n     --family {Debian,RedHat,Gentoo}, -f {Debian,RedHat,Gentoo}\n                           ansible_os_family value for Base Image\n   \nTested image/family combinations:\n\n| image *debian:7.7* / family *Debian*  \u003c-- default values if not specified\n| image *centos:centos7.2.1511* / family *RedHat*\n| image *gentoo-amd64-plus-portage* / family *Gentoo*\n\nGentoo notes\n------------\n\nRather than being able to simply pull official gentoo docker images, it was necessary to merge the stage3 and portage images to work around a docker limitation: docker currently has no way to mount volumes while building an image, only when starting up a container from an already-built image (see https://github.com/docker/docker/issues/3949 for further discussion of this limitation).\n\nSee `base-images/Dockerfile.gentoo-amd64-portage \u003cbase-images/Dockerfile.gentoo-amd64-portage\u003e`_ as example for creating base image for testing on Gentoo. This Dockerfile inherits from `gentoo/stage3-amd64 Dockerfile \u003chttps://github.com/gentoo/gentoo-docker-images/blob/master/amd64/Dockerfile\u003e`_ and adds the commands from `gentoo/portage Dockerfile \u003chttps://github.com/gentoo/gentoo-docker-images/blob/master/portage/Dockerfile\u003e`_ in order to create a full stage3 image with /usr/portage included rather than relying on a separage image containing a portage volume. \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnylas%2Fansible-test","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnylas%2Fansible-test","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnylas%2Fansible-test/lists"}