Add Vagrantfile for testing locally

master
Carlos León 10 years ago
parent 3ddbe81ceb
commit cc0b88ff6c

5
.gitignore vendored

@ -0,0 +1,5 @@
# Ignore Vagrant cache files
/.vagrant/
# Ignore retry files
*.retry

13
Vagrantfile vendored

@ -0,0 +1,13 @@
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure(2) do |config|
config.vm.box = "centos/7"
config.vm.provider "virtualbox" do |vb|
vb.memory = "512"
end
config.vm.provision "ansible" do |ansible|
ansible.playbook = "tests/vagrant.yml"
end
end

@ -1,5 +1,6 @@
---
- hosts: localhost
remote_user: root
become: yes
become_user: root
roles:
- .

@ -0,0 +1,16 @@
---
- hosts: all
become: yes
become_user: root
vars:
- clusterstore: yes
roles:
- ../docker
tasks:
- name: check consul state
command: docker ps -q -f name=consul
register: consulcheck
- name: ensure consul is running
command: docker run -d --name consul -p "8500:8500" progrium/consul -server -bootstrap
when: consulcheck.stdout_lines | length == 0
Loading…
Cancel
Save