UncleNUC Wiki

Second chance for NUCs

User Tools

Site Tools


lab:ansible_virtualbox_autoboot_linux:deploy_a_fleet_of_vms

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
lab:ansible_virtualbox_autoboot_linux:deploy_a_fleet_of_vms [2024/01/29 21:16] – [Create a New variables.yml File] userlab:ansible_virtualbox_autoboot_linux:deploy_a_fleet_of_vms [2024/05/10 05:16] (current) – removed user
Line 1: Line 1:
-====== 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: 
-  - Give sudo permissions to user ansible 
-  - Set up the variables.yml file 
-  - Set up up the server.yml file with the information about the servers we want 
-  - Create jinja templates 
-  - Create playbook to deploy servers 
-  - 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 a new variables.yml file in the home directory (you are the user ''ansible'' now, so it's in /home/ansible). 
- 
-Replace the ssh key with the one you saved earlier. Also as before you need to replaced the bridge_interface_name value with the interface of your host machine. 
- 
-<file yaml variables.yml> 
---- 
-Global: 
-  bridge_interface_name: "enp8s0" 
-  username: ansible 
-  ssh_key: "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQCIlNJecNoDFTVdVqDRGYjxH22Ih1qq5VPhMtRrrECa8BwpICxClbYh0XcLzijaae1sI0j+jBo/BHXyrER010NEyq18ZWNI+NUvg+wF77CfPBFxwla3Xsel8rBgu47RMn4W5g1KHrw9Sy0OzfljKBlXuuRwrzHyT6qoi4Iu3ltySrPj1zMCbybiQCI0A77T6GQpBbxMZBJJNYfAXchNnxLIAW8Q2taXJ+JYbHg0mtL/lp35vwRNgUFOwm8l7YiehlcTybEHGoN+aI/0AWkl1tvEaol8sluKba01hlM4n1JWI+BQewu69l0Lqnoiiob+WvqchjpEw/QwDo2HaB5YAZCNX89QO4DHLyg6KTvsfvQhQ70HcXGfQTatqXlBkKa83ny4Xn3doA036Z+CbpZVbzYF0swpjEXj/GXvZzxILkp2HF2auIjT/HPX5Jecq/VBDqDRbPKyyJjdM4pRiHcCel2JLPzwLhMJHnXKPtiCppxIyrL3PXgh1oY/fhMDN2Bo6sM= autobox@autobox" 
-  workingdir: "{{ lookup('env','HOME') }}/ubuntu-autoinstall" 
-  inventory_file: "{{ lookup('env','HOME') }}/inventory" 
-  vboxmanage_path: /usr/bin/vboxmanage 
-  ubuntu_iso: https://cdimage.ubuntu.com/ubuntu-server/jammy/daily-live/current/jammy-live-server-amd64.iso 
-  ubuntu_iso_filename: jammy-live-server-amd64.iso 
-  new_iso_filename: ubuntu-22.04-autoinstall.iso 
-</file> 
-===== Create servers.yml File ===== 
- 
-===== Create  server-user-data.js Jinja File ===== 
- 
-===== Deploy Servers ===== 
- 
-===== Update Servers ===== 
- 
- 
-====== Next Step ====== 
-continue to.... [[Deploy an Application to our fleet of VMs]] 
- 
-Or back to [[Delete the First Ubuntu VM using Ansible]] 
- 
-====== Optional ====== 
-Explore using CSV files from Excel 
- 
  
lab/ansible_virtualbox_autoboot_linux/deploy_a_fleet_of_vms.1706562994.txt.gz · Last modified: 2024/01/29 21:16 by user