- Slides
-
Labs
- 1.0 - Setting up Ansible
- 2.0 - Documentation
- 3.0 - Setup and AdHoc Commands
- 4.0 - Ansible Playbooks - Basics
- 4.1 - Ansible Playbooks - Variables and Loops
- 4.2 - Ansible Playbooks - Templates
- 4.3 - Ansible Playbooks - Output
- 5.0 - Ansible Roles - Basics
- 5.1 - Ansible Roles - Handlers and Blocks
- 6.0 - Managing Secrets with Ansible Vault
- 7.0 - Ansible Galaxy and more
- About
- Setup
CentOS/RHEL Vagrant Setup
To participate in the lab you can use any 3 Linux servers of your choice. The labs are tailored for setup with CentOS/RHEL hosts. Below are instructions on how to setup the 3 required host with Vagrant on Linux. Follow the step by step guide to bootstrap the techlab environment on your OS of choice.
The following passwords are not secure and intended only to be used with local virtual machines not reachable from outside of the virtualization host.
Connectivity Details
With the Linux Vagrant setup provided the three local CentOS virtual machines running under KVM have the following IP addresses and credentials.
control: 192.168.122.30
node1: 192.168.122.31
node2: 192.168.122.32
user: vagrant
password: vagrant
CentOS/RHEL Based Systems
RHEL and CentOS ship per default with Vagrant. Depending on the version and age of the distribution Vagrant may not include support for CentOS 8 and fails during the initial setup. As such the RPM package from HashiCorp the vendor of Vagrant is utilized to ensure a frictionless lab experience.
Techlab Installation and Startup
# install libvirt and build-dependencies
sudo yum install libvirt libvirt-daemon-kvm libvirt-devel gcc make rsync
# start libvirtd
sudo systemctl start libvirtd.service
# install vagrant from hashicorp
curl --location -o /var/tmp/vagrant_2.2.7_x86_64.rpm \
https://releases.hashicorp.com/vagrant/2.2.7/vagrant_2.2.7_x86_64.rpm
sudo yum localinstall /var/tmp/vagrant_2.2.7_x86_64.rpm
# Add your user to the libvirt group
sudo usermod -a -G libvirt ${USER}
# install vagrant plugin for libvirt
vagrant plugin install vagrant-libvirt
# create working directory and download vagrant file
mkdir ansible-techlab
cd ansible-techlab
curl -o Vagrantfile \
https://raw.githubusercontent.com/puzzle/ansible-techlab/master/Vagrantfile
# setup vm's
vagrant up
Techlab Shutdown
cd ansible-techlab
# shutdown all vm's
vagrant destroy -f