Ensure that /var is mounted with dev and exec options prior to LXC container creation.
Some checks reported errors
continuous-integration/drone/push Build was killed
Some checks reported errors
continuous-integration/drone/push Build was killed
This commit is contained in:
parent
4c6d30a52c
commit
14883aa95e
|
@ -1,5 +1,6 @@
|
||||||
---
|
---
|
||||||
# TODO: trouver comment faire une copie initiale de /etc/fstab
|
# TODO: trouver comment faire une copie initiale de /etc/fstab
|
||||||
|
# - piste : paramètre "backup" du module mount https://docs.ansible.com/ansible/latest/collections/ansible/posix/mount_module.html
|
||||||
# TODO: try to use the custom mount_uuid module for a different approach
|
# TODO: try to use the custom mount_uuid module for a different approach
|
||||||
|
|
||||||
- name: Fetch fstab content
|
- name: Fetch fstab content
|
||||||
|
|
|
@ -43,6 +43,16 @@
|
||||||
- lxc_unprivilegied_containers | bool
|
- lxc_unprivilegied_containers | bool
|
||||||
- root_subuids.rc != 0
|
- root_subuids.rc != 0
|
||||||
|
|
||||||
|
- name: /var has mount options dev and exec enabled
|
||||||
|
mount:
|
||||||
|
path: /var
|
||||||
|
opts: dev,exec
|
||||||
|
state: remounted
|
||||||
|
with_items: "{{ ansible_mounts }}"
|
||||||
|
when: "item.mount == '/var' and
|
||||||
|
('nodev' in item.options.split(',') or
|
||||||
|
'noexec' in item.options.split(','))"
|
||||||
|
|
||||||
- name: Create containers
|
- name: Create containers
|
||||||
include: create-container.yml
|
include: create-container.yml
|
||||||
vars:
|
vars:
|
||||||
|
|
Loading…
Reference in a new issue