Skip to content

About

Proxmox based homelab initialization script using Ansible

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Repository files navigation

Commits Last Commit Issues Unlicense License

Table of Contents
  1. About The Project
  2. Getting Started
  3. Usage
  4. Roadmap
  5. Contributing
  6. License
  7. Acknowledgments
  8. FAQ

About The Project

Scholar's Sanctum is my home lab project named by my vastly unfinished personal tool suite.

This is an Ansible project which will be run on a freshly installed proxmox host to bootstrap basic configuration, including:

  • Setting up admin users on host & datacenter
  • Configuring SSH on host
  • Configuring repositories
  • Generating a base debian vm template

For admins and the template I provided variables so the roles can be configured as desired. It is still rather basic though.

(back to top)

Built With

Ansible Badge Proxmox Badge Debian Badge

(back to top)

Getting Started

Prerequisites

  • Linux or WSL
  • Ansible installed on device
  • Versions used
    • Proxmox: 8.4.1
    • Ansible: 2.14.18

Installation

1. Install proxmox manually on server device.

2. Reset root password to something more secure, if not already done so.

  • Change on datacenter through GUI
  • Change on host using passwd

3. Configure storage.

4. Generate SSH key on client

ssh-keygen

4. Provide client ssh key to root

ssh-copy-id -i <public-key-location> root@<host>

Configuration

1. Generate vault file with secrets and the following structure

ansible-vault create group_vars/sanctum/vault.yml
vault_admins:
  <name>: "<password-hash>"
ansible_become_password: "<password>"
ansible_ssh_private_key_file: "<private-key-location>"

Alternatively omit ansible_become_password and provide ask-become-pass ad-hoc when running the playbook.

2. Configure group_vars/sanctum/settings.yml and proxmox_template as desired

(back to top)

Usage

1. Setup SSH agent on client

Only really recommended when using a passphrase-protected ssh key so that you don't have to reenter it every time you run a play.

eval "$(ssh-agent -s)"
ssh-add <private-key-location>

2. Run playbooks

ansible-playbook bootstrap_proxmox.yml -i ./inventory/hosts.ini --ask-vault-pass
ansible-playbook configure_datacenter.yml -i ./inventory/hosts.ini --ask-vault-pass

(back to top)

Roadmap

  • Configure storage per Ansible
  • Add role argument validation

(back to top)

Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

License

Distributed under the GNU GPLv3. See LICENSE.md for more information.

(back to top)

Acknowledgments

(back to top)

FAQ

Why not use the community proxmox module?

I wanted the initialization to be as simple as possible. Also it's a great learning experience.

(back to top)

About

Proxmox based homelab initialization script using Ansible

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors