Skip to content

pramine/ansible-hosts-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ansible-hosts-example

This is a really simple example of how to test with Ansible.

Require packages

  • Ansible
  • Vagrant
  • Ansible Lint
  • Serverspec

If you have the above installed you should be able to do the below.

$ vagrant up
$ ./test_it
=> Linting Ansible Code
==> LINTING ./tasks/main.yml
==> LINTING ./test.yml
==> LINTING ./vars/test.yml
=> Run Ansible
==> default: Running provisioner: ansible...

PLAY [all] ********************************************************************

GATHERING FACTS ***************************************************************
ok: [default]

TASK: [ensure /etc/hosts] *****************************************************
ok: [default]

PLAY RECAP ********************************************************************
default                    : ok=2    changed=0    unreachable=0    failed=0

=> Verify Environment
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby -S rspec spec/default/httpd_spec.rb
...

Finished in 5.67 seconds
3 examples, 0 failures
=> SUCCESS

About

Testing with Ansible

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published