From 8b6d0fea3feecf12ef494dc65116defd5a7c08ed Mon Sep 17 00:00:00 2001 From: Musee Ullah Date: Fri, 26 Oct 2018 00:22:45 -0700 Subject: [PATCH] v0.8.0 release bump, final touches/doc updates --- README.md | 14 ++++++++++---- meta/main.yml | 6 +++--- 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 4dfe0a6..d7f6e5f 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,9 @@ -[![Build Status](https://travis-ci.org/lae/ansible-role-travis-lxc.svg?branch=master)](https://travis-ci.org/lae/ansible-role-travis-lxc) -[![Galaxy Role](https://img.shields.io/badge/ansible--galaxy-travis--lxc-blue.svg)](https://galaxy.ansible.com/lae/travis-lxc/) - lae.travis-lxc ============== +[![Build Status](https://travis-ci.org/lae/ansible-role-travis-lxc.svg?branch=master&style=for-the-badge)](https://travis-ci.org/lae/ansible-role-travis-lxc) +[![Ansible Galaxy Role](https://img.shields.io/ansible/role/27270.svg?style=for-the-badge)](https://galaxy.ansible.com/lae/travis-lxc) + Configures and starts N LXC containers to use in the Travis CI environment for simpler testing of Ansible roles across different distributions. @@ -23,16 +23,21 @@ sudo: required dist: trusty install: - pip install ansible -- ansible-galaxy install lae.travis-lxc,v0.7.3 +- ansible-galaxy install lae.travis-lxc,v0.8.0 - ansible-playbook tests/install.yml -i tests/inventory before_script: cd tests/ script: +# Validates your deployment playbook's syntax, which should contain your role - ansible-playbook -i inventory deploy.yml --syntax-check +# Runs the deployment playbook - ansible-playbook -i inventory -v deploy.yml +# Runs the deployment playbook again, saving output to a file called play.log, +# then checks that there are no changed/failed tasks and fails if there are. - 'ANSIBLE_STDOUT_CALLBACK=debug unbuffer ansible-playbook -vv -i inventory deploy.yml > play.log || (e=$?; cat play.log; exit $e); printf "Idempotence: "; grep -A1 "PLAY RECAP" play.log | grep -qP "changed=0 .*failed=0 .*" && (echo "PASS"; exit 0) || (echo "FAIL"; cat play.log; exit 1)' +# Integration tests and what not - ANSIBLE_STDOUT_CALLBACK=debug ansible-playbook -i inventory -v test.yml ``` @@ -59,6 +64,7 @@ build process, but the following is what typically serves most purposes: - profile: centos-7 - profile: alpine-v3.8 +# Add any other setup tasks you might need but don't necessarily need in your role - hosts: all tasks: [] ``` diff --git a/meta/main.yml b/meta/main.yml index 953f317..26cf508 100644 --- a/meta/main.yml +++ b/meta/main.yml @@ -1,9 +1,8 @@ galaxy_info: author: Musee Ullah - description: Configures LXC containers to use for testing Ansible roles on Travis CI - company: FireEye, Inc. + description: Builds and configures LXC container hosts to use for integration testing Ansible roles on Travis CI license: MIT - min_ansible_version: 2.3 + min_ansible_version: 2.5 github_branch: master platforms: - name: Ubuntu @@ -12,4 +11,5 @@ galaxy_info: galaxy_tags: - development - ansible + - testing - ci