mirror of
https://github.com/willshersystems/ansible-sshd
synced 2024-11-10 13:43:30 +01:00
Add testing via Vagrant
Still needs a bit of work to make OS switching a little more seamless
This commit is contained in:
parent
c42662efa9
commit
6e4931fa9d
3 changed files with 11 additions and 8 deletions
16
Vagrantfile
vendored
16
Vagrantfile
vendored
|
@ -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
1
tests/roles/ansible-sshd
Symbolic link
|
@ -0,0 +1 @@
|
|||
../../.
|
|
@ -1,5 +1,5 @@
|
|||
---
|
||||
- hosts: localhost
|
||||
remote_user: root
|
||||
sudo: true
|
||||
roles:
|
||||
- ansible-sshd
|
||||
|
|
Loading…
Reference in a new issue