From 0681dd289afc0d31575864dcc5a0de070dcf427e Mon Sep 17 00:00:00 2001 From: diodonfrost Date: Fri, 28 Dec 2018 11:10:17 +0100 Subject: [PATCH] add kitchen-ci file --- .kitchen.yml | 160 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 160 insertions(+) create mode 100644 .kitchen.yml diff --git a/.kitchen.yml b/.kitchen.yml new file mode 100644 index 0000000..0f0d57a --- /dev/null +++ b/.kitchen.yml @@ -0,0 +1,160 @@ +--- +# we use docker as plateform +driver: + name: docker + privileged: true + volume: /sys/fs/cgroup:/sys/fs/cgroup + +# Ansible will be our provisioner +provisioner: + name: ansible_playbook + hosts: localhost + require_chef_for_busser: false + require_ruby_for_busser: false + require_ansible_omnibus: false + idempotency_test: true + +verifier: + name: inspec + inspec_tests: + - path: tests/inspec + +platforms: + # Centos + - name: centos-7 + driver: + image: diodonfrost/centos-7-ansible + run_command: /sbin/init + platform: centos + provision_command: + - sed -i 's/UsePAM yes/UsePAM no/g' /etc/ssh/sshd_config + - name: centos-6 + driver: + image: diodonfrost/centos-6-ansible + platform: centos + run_command: /sbin/init + provision_command: + - sed -i 's/UsePAM yes/UsePAM no/g' /etc/ssh/sshd_config + + # Fedora + - name: fedora-27 + driver: + image: diodonfrost/fedora-27-ansible + run_command: /usr/sbin/init + platform: centos + provision_command: + - sed -i 's/UsePAM yes/UsePAM no/g' /etc/ssh/sshd_config + - name: fedora-26 + driver: + image: diodonfrost/fedora-26-ansible + run_command: /usr/sbin/init + platform: centos + provision_command: + - sed -i 's/UsePAM yes/UsePAM no/g' /etc/ssh/sshd_config + + # Ubuntu + - name: ubuntu-18.04 + driver: + image: diodonfrost/ubuntu-18.04-ansible + provision_command: apt-get install -y init + run_command: /sbin/init + platform: ubuntu + - name: ubuntu-16.04 + driver: + image: diodonfrost/ubuntu-16.04-ansible + provision_command: apt-get install -y init + run_command: /sbin/init + platform: ubuntu + - name: ubuntu-14.04 + driver: + image: diodonfrost/ubuntu-14.04-ansible + platform: ubuntu + + # Debian + - name: debian-9 + driver: + image: diodonfrost/debian-9-ansible + provision_command: apt-get install -y systemd + run_command: /bin/systemd + platform: debian + - name: debian-8 + driver: + image: diodonfrost/debian-8-ansible + run_command: /sbin/init + platform: debian + - name: debian-7 + driver: + image: diodonfrost/debian-7-ansible + platform: debian + + # Oraclelinux + - name: oraclelinux-7 + driver: + image: diodonfrost/oraclelinux-7-ansible + run_command: /usr/sbin/init + platform: centos + provision_command: + - sed -i 's/UsePAM yes/UsePAM no/g' /etc/ssh/sshd_config + - systemctl enable sshd + - name: oraclelinux-6 + driver: + image: diodonfrost/oraclelinux-6-ansible + run_command: /sbin/init + platform: centos + + # Amazonlinux + - name: amazonlinux-2 + driver: + image: diodonfrost/amazonlinux-2-ansible + run_command: /usr/sbin/init + platform: centos + provision_command: + - sed -i 's/UsePAM yes/UsePAM no/g' /etc/ssh/sshd_config + - name: amazonlinux-1 + driver: + image: diodonfrost/amazonlinux-1-ansible + run_command: /sbin/init + platform: centos + + # Opensuse + - name: opensuse-42.3 + driver: + image: diodonfrost/opensuse-42.3-ansible + run_command: /usr/lib/systemd/systemd + platform: opensuse + provision_command: + - sed -i 's/UsePAM yes/UsePAM no/g' /etc/ssh/sshd_config + - systemctl enable sshd + - name: opensuse-42.2 + driver: + image: diodonfrost/opensuse-42.2-ansible + run_command: /usr/lib/systemd/systemd + platform: opensuse + provision_command: + - sed -i 's/UsePAM yes/UsePAM no/g' /etc/ssh/sshd_config + - systemctl enable sshd + - name: opensuse-13.2 + driver: + image: diodonfrost/opensuse-13.2-ansible + run_command: /usr/lib/systemd/systemd + platform: opensuse + provision_command: + - sed -i 's/UsePAM yes/UsePAM no/g' /etc/ssh/sshd_config + - systemctl enable sshd + + # Archlinux + - name: archlinux-rolling + driver: + image: diodonfrost/opensuse-13.2-ansible + run_command: /usr/lib/systemd/systemd + platform: opensuse + provision_command: + - sed -i 's/UsePAM yes/UsePAM no/g' /etc/ssh/sshd_config + - systemctl enable sshd + +suites: + # Test openjdk-latest + - name: default + provisioner: + name: ansible_playbook + playbook: tests/test.yml