Compare commits
2 Commits
29d95d0f68
...
eae7345be7
Author | SHA1 | Date | |
---|---|---|---|
eae7345be7 | |||
75d9d95483 |
2
init-incus.sh
Executable file
2
init-incus.sh
Executable file
@ -0,0 +1,2 @@
|
||||
#!/bin/sh
|
||||
incus admin init --preseed < init-preseed.yml
|
@ -1,7 +1,5 @@
|
||||
# This file contains the complete preseed configuration for Incus.
|
||||
config:
|
||||
# This is for global daemon configuration
|
||||
core.https_address: :8443 # We will set this here instead of a separate command
|
||||
core.https_address: :8443
|
||||
|
||||
storage_pools:
|
||||
- name: default
|
||||
@ -22,11 +20,11 @@ profiles:
|
||||
- name: default
|
||||
devices:
|
||||
root:
|
||||
path: /
|
||||
pool: default
|
||||
type: disk
|
||||
pool: default
|
||||
path: /
|
||||
eth0:
|
||||
name: eth0
|
||||
type: nic
|
||||
nictype: bridged
|
||||
parent: incusbr0
|
||||
type: nic
|
||||
name: eth0
|
||||
|
@ -11,7 +11,6 @@
|
||||
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:
|
||||
@ -21,6 +20,11 @@
|
||||
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 }}"
|
||||
@ -68,7 +72,7 @@
|
||||
changed_when: false
|
||||
|
||||
- name: Initialize Incus daemon with preseed file (if not already initialized)
|
||||
shell: "cat {{ playbook_dir }}/preseed-full.yml | incus admin init --preseed"
|
||||
script: init-incus.sh
|
||||
args:
|
||||
chdir: "{{ playbook_dir }}"
|
||||
when: incus_check.rc != 0
|
||||
|
@ -1,13 +0,0 @@
|
||||
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
|
@ -1,26 +0,0 @@
|
||||
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