Compare commits

..

No commits in common. "eae7345be7aad53d5f479e5aff1674dfa36ae040" and "29d95d0f686be2fdf660eb3753a51f1eca751268" have entirely different histories.

5 changed files with 48 additions and 13 deletions

View File

@ -1,2 +0,0 @@
#!/bin/sh
incus admin init --preseed < init-preseed.yml

View File

@ -1,5 +1,7 @@
# This file contains the complete preseed configuration for Incus.
config:
core.https_address: :8443
# This is for global daemon configuration
core.https_address: :8443 # We will set this here instead of a separate command
storage_pools:
- name: default
@ -20,11 +22,11 @@ profiles:
- name: default
devices:
root:
type: disk
pool: default
path: /
pool: default
type: disk
eth0:
type: nic
name: eth0
nictype: bridged
parent: incusbr0
name: eth0
type: nic

View File

@ -11,6 +11,7 @@
repo_file: "/etc/apt/sources.list.d/zabbly-incus-stable.sources"
os_codename: "{{ ansible_lsb.codename }}"
arch: "{{ 'amd64' if ansible_architecture == 'x86_64' else ansible_architecture }}"
# Get the non-root user who invoked sudo for group membership
target_user: "{{ lookup('env', 'SUDO_USER') | default(lookup('env', 'USER'), true) }}"
tasks:
@ -20,11 +21,6 @@
state: present
update_cache: yes
- name: Ensure ZFS support is installed
apt:
name: zfsutils-linux
state: present
- name: Create APT keyring directory
file:
path: "{{ keyring_dir }}"
@ -72,7 +68,7 @@
changed_when: false
- name: Initialize Incus daemon with preseed file (if not already initialized)
script: init-incus.sh
shell: "cat {{ playbook_dir }}/preseed-full.yml | incus admin init --preseed"
args:
chdir: "{{ playbook_dir }}"
when: incus_check.rc != 0

View File

@ -0,0 +1,13 @@
networks:
- config:
ipv4.address: 10.69.69.1/24
ipv4.nat: "true"
ipv6.address: none
name: incusbr0
type: bridge
storage_pools:
- config:
source: /var/lib/incus/storage-pools/default
name: default
driver: dir

26
preseed-profile.yml Normal file
View File

@ -0,0 +1,26 @@
profiles:
- name: default
config: {}
description: Default Incus profile
devices:
eth0:
name: eth0
network: incusbr0
type: nic
root:
path: /
pool: default
type: disk
config:
core.https_address: :8443
projects:
- name: default
config:
features.images: "true"
features.networks: "true"
features.profiles: "true"
features.storage.volumes: "true"
features.storage.buckets: "true"
features.networks.zones: "true"