Skip to content

Ansible config for my homelab raspberry cluster and Linux laptop

Notifications You must be signed in to change notification settings

Dakad/homelab-iac

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

HomeLab IAC with Ansible

Little repo to host ansible config about my homelab's rapberry-pi clusters and laptop

Before start

All targets host must have the ansible SSH keys to allow Ansible to easily connect without password To generate the SSH keys (this has to be done only once, if the file already exists, retrieve it):

ssh-keygen -t ed25519 -C "Homelab Ansible" -f $HOME/.ssh/ansible.id_ed25519

Now, we need to send the ssh to the target hosts using ssh-copy-id, repeat the command for every host: For instance, to send to raspodin

# Dietpi will be used as become user for rpi and pihole (user of reference if needed intead of root)
ssh-copy-id -p 22 -i ~/.ssh/ansible.id_ed25519 [email protected]

To run the playbook, use the following command:

ansible-playbook common_playbook.yml --u dietpi  --private-key=$HOME/.ssh/ansible.id_ed25519 -i ./hosts

Docs

THere is folder docs with all necessary information and usefull commands to use

About

Ansible config for my homelab raspberry cluster and Linux laptop

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages