We are going to start by looking at Ansible Tower. As you may recall, this is commercial software, so we will need a license; luckily, Red Hat provides a trial license. You can request it by clicking on the Try Tower Free button at https://www.ansible.com/.
After a while, you will receive an email that looks like the following:
Click on the DOWNLOAD TOWER NOW (.TAR) button; this will open your browser and download a TAR file containing the playbooks we will be running to deploy Ansible Tower. Next up, we need a server to host our Ansible Tower installation. Let's use the Vagrantfile we have used in other chapters:
# -*- mode: ruby -*-
# vi: set ft=ruby :
API_VERSION = "2"
BOX_NAME = "centos/7"
BOX_IP = "10.20.30.40"
DOMAIN = "nip.io"
PRIVATE_KEY = "~/.ssh/id_rsa"
PUBLIC_KEY = '~/.ssh/id_rsa.pub'
Vagrant.configure(API_VERSION) do |config|
config.vm.box = BOX_NAME
config.vm.network "private_network", ip: BOX_IP
config.vm.host_name = BOX_IP + '.' + DOMAIN
config.ssh.insert_key = false
config.ssh.private_key_path = [PRIVATE_KEY, "~/.vagrant.d/insecure_private_key"]
config.vm.provision "file", source: PUBLIC_KEY, destination: "~/.ssh/authorized_keys"
config.vm.provider "virtualbox" do |v|
v.memory = "2024"
v.cpus = "2"
end
config.vm.provider "vmware_fusion" do |v|
v.vmx["memsize"] = "2024"
v.vmx["numvcpus"] = "2"
end
end
Once the Vagrantfile is in place, you can launch the Vagrant box using one of the following commands:
$ vagrant up
$ vagrant up --provider=vmware_fusion
Once you have the Vagrant box up and running, you can look at what changes you need to make to the inventory, which is contained within the TAR file we downloaded.