Add Machine to Fleet - rollthecloudinc/school GitHub Wiki

Install Pop-OS

Enter machine BIOS and change boot order making USB Drive first option. Go to security settings in BIOS and disable secure boot if available and enabled. Save settings, shut down machine. Insert thumb drive with Pop-OS OS image/disk and follow instructions to install.

  • user: Todd Zmijewski
  • username: tzmijewski

Once POP-OS installed click option to shut down machine instead of restart. Once machine shut down take out thumb drive. Once thumb drive out of machine start-up machine and finish set-up process.

NOTE: POP-OS can only be installed on 64bit machines.

Passwordless Sudo Set-up

For Ansible to install software sudo is required. However, by default the user (tzmijewski) will not be allowed to elevate to sudo. To allow this requires a slight change to the new machines (target) sudoers file to allow passwordless sudo for the default user (tzmijewski).

sudo visudo
tzmijewski ALL=(ALL) NOPASSWD:ALL
  • Then Ctrl+O then enter to write.
  • Then Ctrl+X to exit
  • Then enter file again to verify and exit the same way.

Once this is done default user (tzmijewski) should be authorized to elevate to sudo from ssh connection allowing Ansible to remotely install software on new machine part of fleet.

SSH Set-up

For Ansible to connect remotely to machines to install software ssh must be set-up. POP OS does not by default some configured with SSH installed. Therefore, SSH must be installed manually via apt package repo.

install ssh server:

sudo apt update
sudo apt install openssh-server

start ssh:

sudo systemctl start ssh

enable ssh:

sudo systemctl enable ssh

Copy SSH Key

The public SSH key of the control node needs to e copied to the new machine (target) so that the control node can authenticate and install software remotely via Ansible. Where IP_ADDRESS is the public ip of the new node (new machine/target). Which can be obtained on the new node (target) by running: whoami in the terminal of that machine. The ip is inet: ? - where ? is the ip minus /xx.

control node:

ssh-copy-id -i ~/.ssh/id_ed25519.pub tzmijewski@IP_ADDRESS

Update hosts file

In the projects hosts file add a new line under [edufleet]. Try to be descriptive with the machine. Ex.

  • lenovo_ideapad_3_blue_core_i3_8g = [lenovo=brand][ideapad_3=make][blue=color][core_i3=cpu][8g=ram]

Install Software (Example)

control node:

ansible-playbook -i hosts playbooks/install_chrome.yml --limit edufleet