Add testing via Vagrant

Still needs a bit of work to make OS switching a little more seamless
This commit is contained in:
Matt Willsher 2016-01-24 15:52:13 +00:00
parent c42662efa9
commit 6e4931fa9d
3 changed files with 11 additions and 8 deletions

16
Vagrantfile vendored
View file

@ -1,4 +1,4 @@
# -*- mode: ruby -*-
# vi: set ft=ruby :
VAGRANTFILE_API_VERSION = "2"
@ -15,13 +15,15 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.define "centos6" do |centos|
centos.vm.box = "bento/centos-6.7"
centos.vm.provision "shell", inline: <<-SHELL
sudo yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm
sudo yum install -y ansible libselinux-python
SHELL
end
config.vm.synced_folder ".", "/etc/ansible/roles/ansible-sshd"
config.vm.provision :ansibleLocal, :playbook => "tests/test.yml"
config.vm.provision "shell", inline: <<-SHELL
sudo yum install -y libselinux-python
SHELL
config.vm.provision "ansible_local" do |ansible|
ansible.playbook = "tests/test.yml"
ansible.install = true
end
end

1
tests/roles/ansible-sshd Symbolic link
View file

@ -0,0 +1 @@
../../.

View file

@ -1,5 +1,5 @@
---
- hosts: localhost
remote_user: root
sudo: true
roles:
- ansible-sshd