Skip to content

Commit

Permalink
Merge pull request #3 from ANXS/farridav/vagrantfile_and_testing
Browse files Browse the repository at this point in the history
Farridav/vagrantfile and testing
  • Loading branch information
otakup0pe committed Mar 31, 2015
2 parents 3089b47 + 2e3df37 commit 778b3dd
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 1 deletion.
7 changes: 6 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,10 @@ install:
- pip install ansible==1.5.0
script:
- echo localhost > inventory
- ansible-playbook --syntax-check -i inventory test.yml
- ansible-playbook -i inventory test.yml --syntax-check
- ansible-playbook -i inventory test.yml --connection=local --sudo
- >
ansible-playbook -i inventory test.yml --connection=local --sudo
| grep -q 'changed=0.*failed=0'
&& (echo 'Idempotence test: pass' && exit 0)
|| (echo 'Idempotence test: fail' && exit 1)
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,12 @@ utilities_extras: [] # List of additional utility package names to be
```
#### Testing
This project comes with a VagrantFile, this is a fast and easy way to test changes to the role, fire it up with `vagrant up`

See [vagrant docs](https://docs.vagrantup.com/v2/) for getting setup with vagrant


#### License

Licensed under the MIT License. See the LICENSE file for details.
Expand Down
16 changes: 16 additions & 0 deletions Vagrantfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# -*- mode: ruby -*-
# vi: set ft=ruby :

Vagrant.configure('2') do |config|
config.vm.define 'anxs' do |c|
c.vm.box = 'ubuntu/trusty64'
c.vm.network :private_network, ip: '192.168.88.27'
c.vm.hostname = 'anxs.local'
c.vm.provision 'ansible' do |ansible|
ansible.playbook = 'test.yml'
ansible.sudo = true
ansible.inventory_path = 'vagrant-inventory'
ansible.host_key_checking = false
end
end
end
2 changes: 2 additions & 0 deletions vagrant-inventory
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[anxs]
anxs.local ansible_ssh_host=192.168.88.27 ansible_ssh_port=22

0 comments on commit 778b3dd

Please sign in to comment.