Last active
February 12, 2017 18:23
-
-
Save jharley/011e8208a36565168cc854ee83b536cc to your computer and use it in GitHub Desktop.
This is a setup of test-kitchen for developing Ansible Galaxy roles on Ubuntu "Xenial" 16.04 using `kitchen-docker`, `kitchen-ansible`, and `kitchen-inspec` with support for systemd services in the container and roles provided via `requirements.yml` as git repos (via ssh)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
driver: | |
name: docker | |
use_sudo: false | |
privileged: true | |
driver_config: | |
http_proxy: <%= ENV['KITCHEN_HTTP_PROXY'] %> | |
https_proxy: <%= ENV['KITCHEN_HTTPS_PROXY'] %> | |
transport: | |
max_ssh_sessions: 5 | |
provisioner: | |
name: ansible_playbook | |
hosts: all | |
enable_yum_epel: false | |
idempotency_test: true | |
ansible_verbose: <%= ENV['ANSIBLE_VERBOSE'] || false %> | |
ansible_verbosity: 2 | |
ansible_diff: true | |
require_chef_for_busser: false | |
require_ruby_for_busser: false | |
http_proxy: <%= ENV['KITCHEN_HTTP_PROXY'] %> | |
https_proxy: <%= ENV['KITCHEN_HTTPS_PROXY'] %> | |
requirements_path: requirements.yml | |
verifier: | |
name: inspec | |
platforms: | |
- name: ubuntu-16.04 | |
driver: | |
image: ubuntu:16.04 | |
run_command: /sbin/init | |
provision_command: | |
- echo "SSHD_OPTS='-o UseDNS=no -o UsePAM=no -o PasswordAuthentication=yes -o UsePrivilegeSeparation=no -o PidFile=/tmp/sshd.pid'" > /etc/default/ssh | |
- apt-get install openssh-client | |
- ssh-keyscan bitbucket.org >> /etc/ssh/ssh_known_hosts && ssh-keyscan github.com >> /etc/ssh/ssh_known_hosts | |
suites: | |
- name: default | |
group_vars_path: test/integration/default/group_vars |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# encoding: utf-8 | |
source 'https://rubygems.org' | |
gem 'test-kitchen', '~> 1.13' | |
gem 'inspec', '~> 1.3' | |
gem 'kitchen-inspec', '~> 0.15' | |
gem 'kitchen-docker', '~> 2.6' | |
gem 'kitchen-ansible', '~> 0.45' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- src: [email protected]:mycompany/ansible-role.git | |
scm: git | |
version: 1.9.2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment