Compare commits
No commits in common. "eae7345be7aad53d5f479e5aff1674dfa36ae040" and "29d95d0f686be2fdf660eb3753a51f1eca751268" have entirely different histories.
eae7345be7
...
29d95d0f68
@ -1,2 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
incus admin init --preseed < init-preseed.yml
|
|
@ -1,5 +1,7 @@
|
|||||||
|
# This file contains the complete preseed configuration for Incus.
|
||||||
config:
|
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:
|
storage_pools:
|
||||||
- name: default
|
- name: default
|
||||||
@ -20,11 +22,11 @@ profiles:
|
|||||||
- name: default
|
- name: default
|
||||||
devices:
|
devices:
|
||||||
root:
|
root:
|
||||||
type: disk
|
|
||||||
pool: default
|
|
||||||
path: /
|
path: /
|
||||||
|
pool: default
|
||||||
|
type: disk
|
||||||
eth0:
|
eth0:
|
||||||
type: nic
|
name: eth0
|
||||||
nictype: bridged
|
nictype: bridged
|
||||||
parent: incusbr0
|
parent: incusbr0
|
||||||
name: eth0
|
type: nic
|
@ -11,6 +11,7 @@
|
|||||||
repo_file: "/etc/apt/sources.list.d/zabbly-incus-stable.sources"
|
repo_file: "/etc/apt/sources.list.d/zabbly-incus-stable.sources"
|
||||||
os_codename: "{{ ansible_lsb.codename }}"
|
os_codename: "{{ ansible_lsb.codename }}"
|
||||||
arch: "{{ 'amd64' if ansible_architecture == 'x86_64' else ansible_architecture }}"
|
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) }}"
|
target_user: "{{ lookup('env', 'SUDO_USER') | default(lookup('env', 'USER'), true) }}"
|
||||||
|
|
||||||
tasks:
|
tasks:
|
||||||
@ -20,11 +21,6 @@
|
|||||||
state: present
|
state: present
|
||||||
update_cache: yes
|
update_cache: yes
|
||||||
|
|
||||||
- name: Ensure ZFS support is installed
|
|
||||||
apt:
|
|
||||||
name: zfsutils-linux
|
|
||||||
state: present
|
|
||||||
|
|
||||||
- name: Create APT keyring directory
|
- name: Create APT keyring directory
|
||||||
file:
|
file:
|
||||||
path: "{{ keyring_dir }}"
|
path: "{{ keyring_dir }}"
|
||||||
@ -72,7 +68,7 @@
|
|||||||
changed_when: false
|
changed_when: false
|
||||||
|
|
||||||
- name: Initialize Incus daemon with preseed file (if not already initialized)
|
- 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:
|
args:
|
||||||
chdir: "{{ playbook_dir }}"
|
chdir: "{{ playbook_dir }}"
|
||||||
when: incus_check.rc != 0
|
when: incus_check.rc != 0
|
||||||
|
13
preseed-network-storage.yml
Normal file
13
preseed-network-storage.yml
Normal 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
26
preseed-profile.yml
Normal 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"
|
Loading…
x
Reference in New Issue
Block a user