lxc-solr: detect the real partition options

This commit is contained in:
Jérémy Lecour 2022-09-26 23:46:29 +02:00 committed by Jérémy Lecour
parent 8089d90bd1
commit 26f9d171a4
2 changed files with 14 additions and 4 deletions

View File

@ -14,6 +14,8 @@ The **patch** part changes is incremented if multiple releases happen the same m
### Changed
* lxc-solr: detect the real partition options
### Fixed
### Removed

View File

@ -43,11 +43,19 @@
- lxc_unprivilegied_containers | bool
- root_subuids.rc != 0
- name: Check if /var has not mount options or nosuid or nodev or noexec
shell: findmnt | grep -E "/var[^/]" | grep -e nodev -e noexec -e nosuid
register: check_var
- name: Get filesystem options
command: findmnt --noheadings --target /var/lib/lxc --output OPTIONS
changed_when: false
failed_when: "check_var.rc == 0"
check_mode: no
register: check_fs_options
- name: Check if options are correct
assert:
that:
- "'nodev' not in check_fs_options.stdout"
- "'noexec' not in check_fs_options.stdout"
- "'nosuid' not in check_fs_options.stdout"
msg: "LXC directory is in a filesystem with incompatible options"
- name: Create containers
include: create-container.yml