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

This commit is contained in:
William Hirigoyen (Evolix) 2022-01-11 11:02:03 +01:00
parent 4c6d30a52c
commit 14883aa95e
2 changed files with 11 additions and 0 deletions

View file

@ -1,5 +1,6 @@
---
# 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
- name: Fetch fstab content

View file

@ -43,6 +43,16 @@
- lxc_unprivilegied_containers | bool
- 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
include: create-container.yml
vars: