Sign inSign up

jasonheecs/ansible

By jasonheecs

•Updated over 6 years ago

Docker images with Ansible and Kitchen CI, installed in Debian, Ubuntu and CentOS.

Image
0

1.3K

jasonheecs/ansible repository overview

⁠Docker Ansible and Kitchen CI Images

Build Status Docker Automated Build Status

A set of Docker images with Ansible and Kitchen CI dependencies installed, meant for easier creation and testing of Ansible playbooks with Kitchen CI. Docker Hub link⁠

⁠Usage

To use the docker images in Kitchen CI, simply specify the image name with the relevant tag in your .kitchen.yml file:

Example:

---
driver:
  name: docker
  use_sudo: false

provisioner:
  hosts: test-kitchen
  name: ansible_playbook
  require_chef_for_busser: false
  ansible_verbosity: 2
  ansible_verbose: true

platforms:
  - name: ubuntu-18.04
    driver_config:
      image: jasonheecs/ansible:ubuntu-18.04
      platform: ubuntu
  - name: ubuntu-16.04
    driver_config:
      image: jasonheecs/ansible:ubuntu-16.04
      platform: ubuntu
  - name: ubuntu-14.04
    driver_config:
      image: jasonheecs/ansible:ubuntu-14.04
      platform: ubuntu
  - name: centos-7.0
    driver_config:
      image: jasonheecs/ansible:centos-7
      platform: centos
  - name: debian-9
    driver_config:
      image: jasonheecs/ansible:debian-9
      platform: debian
  - name: debian-8
    driver_config:
      image: jasonheecs/ansible:debian-8
      platform: debian

verifier:
  name: serverspec

suites:
  - name: default
    verifier:
      default_pattern: true
      bundler_path: '/usr/local/bin'
      rspec_path: '/usr/local/bin'

⁠Tags

List of tags and their distros:

  • jasonheecs/ansible:ubuntu-18.04
  • jasonheecs/ansible:ubuntu-16.04
  • jasonheecs/ansible:ubuntu-14.04
  • jasonheecs/ansible:centos-7
  • jasonheecs/ansible:debian-9
  • jasonheecs/ansible:debian-8

⁠Testing

Testing is done via Rspec and Hadolint⁠.

To run Rspec tests:

gem install bundler
bundle install
bundle exec rspec spec/<name-of-spec-file>
#e.g: bundle exec rspec spec/ubuntu_bionic_spec.rb

To run linting tests on the Dockerfiles, make sure Hadolint installed and:

hadolint ./ubuntu18.04/Dockerfile

Refer to the travis.yml⁠ file and Travis build logs⁠ for details on the automated tests and expected outputs.

⁠License

MIT

Tag summary

Content type

Image

Digest

Size

115.3 MB

Last updated

over 6 years ago

docker pull jasonheecs/ansible:ubuntu-14.04