initialization fixed
This commit is contained in:
parent
eae7345be7
commit
4272b071e4
21
README.md
21
README.md
@ -28,7 +28,6 @@ This playbook automates the installation and setup of the **stable** version of
|
|||||||
## Post-Installation Instructions
|
## Post-Installation Instructions
|
||||||
|
|
||||||
After the playbook completes successfully:
|
After the playbook completes successfully:
|
||||||
|
|
||||||
1. **Configure User Access:**
|
1. **Configure User Access:**
|
||||||
|
|
||||||
Refresh group membership.
|
Refresh group membership.
|
||||||
@ -36,7 +35,6 @@ After the playbook completes successfully:
|
|||||||
```bash
|
```bash
|
||||||
newgrp incus-admin
|
newgrp incus-admin
|
||||||
```
|
```
|
||||||
|
|
||||||
2. **Verify Setup:**
|
2. **Verify Setup:**
|
||||||
|
|
||||||
You can test the installation by running.
|
You can test the installation by running.
|
||||||
@ -45,7 +43,22 @@ After the playbook completes successfully:
|
|||||||
incus --version
|
incus --version
|
||||||
```
|
```
|
||||||
|
|
||||||
3. **Enable and Access the Incus Web UI:**
|
3. **Check Incus Initialization:**
|
||||||
|
|
||||||
|
Try checking the storage:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
incus storage show default
|
||||||
|
```
|
||||||
|
> If the display is: 'Error: Storage pool not found' then initialize it through interactive mode:
|
||||||
|
|
||||||
|
Try interactive mode if initialization failed:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
incus admin init
|
||||||
|
```
|
||||||
|
|
||||||
|
4. **Enable and Access the Incus Web UI:**
|
||||||
|
|
||||||
Enable port 8443:
|
Enable port 8443:
|
||||||
|
|
||||||
@ -62,7 +75,7 @@ After the playbook completes successfully:
|
|||||||
|
|
||||||
> Follow the self-signed certificate instructions when prompted for mLTS
|
> Follow the self-signed certificate instructions when prompted for mLTS
|
||||||
|
|
||||||
4. **Incus Network - Access Containers by Name (Optional):**
|
5. **Incus Network - Access Containers by Name (Optional):**
|
||||||
|
|
||||||
Configuring name-to-IP resolution so the host OS can reach Incus containers using their names.
|
Configuring name-to-IP resolution so the host OS can reach Incus containers using their names.
|
||||||
|
|
||||||
|
16
playbook.yml
16
playbook.yml
@ -65,17 +65,29 @@
|
|||||||
name: [incus, incus-client, incus-ui-canonical, ufw]
|
name: [incus, incus-client, incus-ui-canonical, ufw]
|
||||||
state: present
|
state: present
|
||||||
|
|
||||||
- name: Check if Incus is already initialized (by checking for default storage pool)
|
- name: Check if Incus storage pool 'default' exists
|
||||||
command: incus storage show default
|
command: incus storage show default
|
||||||
register: incus_check
|
register: incus_check
|
||||||
failed_when: false
|
failed_when: false
|
||||||
changed_when: false
|
changed_when: false
|
||||||
|
|
||||||
|
- name: Check if Incus bridge 'incusbr0' exists
|
||||||
|
command: incus network show incusbr0
|
||||||
|
register: net_check
|
||||||
|
failed_when: false
|
||||||
|
changed_when: false
|
||||||
|
|
||||||
|
- name: Check if default profile exists
|
||||||
|
command: incus profile show default
|
||||||
|
register: profile_check
|
||||||
|
failed_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
|
script: init-incus.sh
|
||||||
args:
|
args:
|
||||||
chdir: "{{ playbook_dir }}"
|
chdir: "{{ playbook_dir }}"
|
||||||
when: incus_check.rc != 0
|
when: incus_check.rc != 0 and net_check.rc != 0 and profile_check.rc != 0
|
||||||
|
|
||||||
- name: Add target user to the incus-admin group for passwordless access
|
- name: Add target user to the incus-admin group for passwordless access
|
||||||
user:
|
user:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user