Ansible Playbook for Local Incus Installation
This playbook automates the installation and setup of the stable version of Incus on the local machine (Debian/Ubuntu). It is designed to be run directly on the server you wish to configure.
Prerequisites
- Ansible: Must be installed on the machine where you are running the playbook.
sudo apt update sudo apt install ansible -y - UFW Ansible Collection: The playbook uses the
community.general.ufwmodule. Install it if you don't have it:ansible-galaxy collection install community.general - Sudo Access: Your user must have
sudoprivileges to run the playbook.
How to Run
-
Customize Variables (Optional): Open
playbook.ymland review thevarssection. You can change the storage pool driver, network settings, etc. The defaults are sensible for a standard ZFS-based setup. -
Execute the Playbook: Run the following command from the same directory as the playbook file. It will prompt you for your
sudopassword to perform the administrative tasks.ansible-playbook playbook.yml --ask-become-pass--ask-become-pass: This flag tells Ansible to prompt for the password needed for privilege escalation (sudo).
Post-Installation Steps
After the playbook completes successfully:
-
Log Out and Log Back In: To apply the
incus-admingroup membership to your user session, you must log out and log back in. Alternatively, for the current session only, you can runnewgrp incus-admin. -
Access the Web UI: Open a browser and navigate to
https://localhost:8443. You will need to accept the self-signed certificate. -
Verify Setup: You can test the installation by running
incus list. If it runs withoutsudo, the setup is successful.