|
||
---|---|---|
group_vars | ||
host_vars | ||
.gitignore | ||
README.md | ||
Vagrantfile | ||
ansible.cfg | ||
hosts | ||
requirements.yml | ||
site.yml |
README.md
playground
ansible plays testbed
tasks
- Write a bash script that creates and boots Vagrant box (https://vagrant.io) with Ubuntu
- Write an Ansible script that connects to this Vagrant box and does the following on it:
- Creates a user "testuser"
- Sets the system's timezone to "Asia/Kolkata"
- Uploads a random local file from the host into the /home/testuser/ directory
- Installs python, supervisord, and the latest version of consul (https://consul.io)
try it
Clone the repo:
$ git clone https://git.planet-express.in/konarak/playground.git
$ ansible-galaxy install -r requirements.yml
$ vagrant up
$ vagrant ssh bionic1
external roles
- brianshumate.consul - https://github.com/brianshumate/ansible-consul
- geerlingguy.supervisor- https://github.com/geerlingguy/ansible-role-supervisor
This playbook uses external roles because while installation of both supervisord, and consul is manageable via a couple of ansible tasks we're left without any configuration management. Both of these roles seem to be trusted by the ansible galaxy community.