Skip to content
/ infra Public

Exploring IaaC with selfhosted stuff

Notifications You must be signed in to change notification settings

artyorsh/infra

Folders and files

NameName
Last commit message
Last commit date

Latest commit

author
Artur Y
Nov 16, 2024
a2479e8 · Nov 16, 2024
Nov 16, 2024
Mar 23, 2024
Sep 11, 2024
Nov 16, 2024
Nov 16, 2024
Nov 16, 2024
Mar 26, 2024
Mar 22, 2024
Jun 20, 2024
Aug 28, 2024
Jun 17, 2024
Nov 16, 2024
Mar 27, 2024
Nov 16, 2024
Sep 11, 2024
Aug 28, 2024
Jun 17, 2024
Aug 2, 2022

Repository files navigation

artyorsh/homelab

Test (Ubuntu 22.04)

Usage (macOS)

Install Ansible

brew install ansible

Install required packages

ansible-galaxy install -r requirements.yml

Create a Keychain item to automate Vault password input

security add-generic-password -a $(whoami) -s ansible-vault-password -w

Run the playbook

When running the playbook on a freshly installed machine, make sure its ssh keys exist locally.

ssh-copy-id root@IP_ADDRESS

Then use --extra-vars to proceed using servers' initial settings

ansible-playbook playbook-pi.yml --extra-vars "ansible_ssh_port=22 ansible_user=root ansible_ssh_password=yourpassword"

For each host, adjust the variables. See in ./host_vars.

For secret variables, be sure to use Vault.

For every subsequent run:

ansible-playbook playbook-pi.yml