Skip to content

NULLx76/Ansible-Proxmox-Automation

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Dilden's Ansible + Proxmox Homelab Automation

What is this?

This repo contains the Ansible playbooks and configuration used to manage and automate my Proxmox based homelab. It makes use of the proxmox and proxmox_kvm modules.

Requirements

Installation

Clone this repo Ensure you also have Ansible (and all other requirements) installed

The main points

  • Configuration is set in ansible.cfg. This exists only to tell Ansible where to look for server definitions (inventory).
  • Servers (inventory) are defined in the hosts file and are placed in "groups" defined by []
  • The group_vars folder contains variables and credentials for use with the servers in those groups.
  • creds.yml will need to be created via ansible-vault create in the appropriate folder and will need to be configured like so:
vault_api_password: 'PROXMOX_HOST_PASSWORD'
vault_100: 'CONTAINER_PASSWORD'
vault_101: 'CONTAINER_PASSWORD'

Just as the host API key needs to be set in group_vars/host/creds.yml, the containers will need to have passwords configured within group_vars/containers/creds.yml matching the appropriate variables set in group_vars/containers/vars.yml.

After setting up everything, run ansible-playbook books\prep-host.yml to ensure proxmoxer and other various dependencies are installed on the host.

Usage

  • Note: All commands will need to be run with --ask-vault-pass appended to them to work with this config.

Update host: ansible-playbook books/update-host-all.yml --ask-vault-pass

Update containers: ansible-playbook books/update-containers.yml --ask-vault-pass

Some useful ad-hoc commands might look like: ansible closingtags -a "find /var/www/html/. -type f -mtime -15" --ask-vault-pass to find any files modified in the past 15 days

or ansible closingtags -a "grep -nr 'atob' /var/www/html/." --ask-vault-pass to search all files for 'atob'.

About

For use with automating my homelab

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published