UncleNUC Wiki

Second chance for NUCs

User Tools

Site Tools


lab:ansible_virtualbox_autoboot_linux:deploy_a_fleet_of_vms

This is an old revision of the document!


Deploy a Fleet of VMs

In this step we will give the ansible account sudo privileges on our host and use playbooks to deploy and manager servers from an inventory of servers.

Overview:

  1. Give sudo permissions to user ansible
  2. Set up the variables.yml file
  3. Set up up the server.yml file with the information about the servers we want
  4. Create jinja templates
  5. Create playbook to deploy servers
  6. Create playbook to update packages on the servers

Grant sudo Permissions to the ansible User

From your regular login account all the ansible user to the sudo group. <code>sudo usermod -aG sudo ansible</group>

You can new test sudo access for the user ansible:

  • su - ansible
  • sudo apt update

For the remainder of the Lab you will be using the ansible user. You may conveniently ssh to your server as user ansible.

Create a New variables.yml File

Create servers.yml File

Create server-user-data.js Jinja File

Deploy Servers

Update Servers

Next Step

Optional

Explore using CSV files from Excel

lab/ansible_virtualbox_autoboot_linux/deploy_a_fleet_of_vms.1705865050.txt.gz · Last modified: 2024/01/21 19:24 by user