lxc-solr: detect the real partition options
This commit is contained in:
parent
8089d90bd1
commit
26f9d171a4
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue