Docker and Ansible
This story is mainly focused Docker with Ansible. I like using Docker in the first place is that it is a pretty light platform to spin up and run or just test and play around with. As you can see in this post my resources are limited.
Setup and install
To use this repo we need a host system with some basic developer and virtualisation tools installed. I have grown into the habbit of not installing to much things I am testing on my development machine for this reason I will use just a virtual machine in virtualbox on which I can install Ansible and run my code base. If you are familiar with using Git Vagrant and virtualbox you can skip these installation steps probably. Another advantage for this way of working is that I can version pinn in my code base which OS and verions of tools to use.
Download the github repo
Install Git on your system brew install git
or sudo apt-get install git
or download it here http://msysgit.github.io/
Download the repo git clone [email protected]:roelsieg/ansiblynology.git
. The repo you may have just downloaded has the following setup:
──inventory
└──goup_vars
└──all
├──default.yml
└──vault.yml
──Playbooks
├──roles
│ ├──role_1
│ └──role_2
└──playbook.yml
──Vagrantfile
──install.sh
──anisble.cfg
Download vagrant and virtualbox
Install vagrant on your system brew cask install vagrant
or sudo apt-get install vagrant
or download it here https://www.vagrantup.com/downloads.html
Install virtualbox on your system brew cask install vagrant
or sudo apt-get install VirtualBox-6.1
or download it here https://www.virtualbox.org/wiki/Linux_Downloads
Starting your development machine
In a console just type in the root directory of the downloaded repo type vagrant up
. This will download and install a Ubuntu Linux machine with Ansible.
After it is downloaded the script install.sh
is started to take care of the Ansible installation.
(Credits for the install script mainly go to Ivan Pepelnjak form https://www.ipspace.net)
Once the Ansible machine is up and running you can login by using vagrant ssh ansible
TO BE CONTINUED …..