Set subuid/subgid before starting LXD

This commit is contained in:
Khue Doan 2021-05-17 01:46:09 +07:00
parent 15c8bb19f1
commit 613a72ea65

View File

@ -29,6 +29,14 @@
- qemu-device-display-virtio-vga
- qemu-device-display-virtio-gpu
- name: Set subuid/subgid range for mapping container users/groups to host UIDs/GIDs
lineinfile:
path: "{{ item }}"
line: "root:1000000:65536"
loop:
- /etc/subuid
- /etc/subgid
- name: Enable LXD service
service:
name: lxd
@ -55,14 +63,6 @@
creates: /var/lib/lxd/cluster.crt
when: inventory_hostname != groups['metal'][0]
- name: Set subuid/subgid range for mapping container users/groups to host UIDs/GIDs
lineinfile:
path: "{{ item }}"
line: "root:1000000:65536"
loop:
- /etc/subuid
- /etc/subgid
# TODO (optimize) Use template for tfvars
- name: Add LXD server to environment variables
lineinfile: