Make canmount configurable for bhyve and jails.
This commit is contained in:
parent
a2a7da0d9b
commit
0a49fc16b6
@ -19,6 +19,8 @@ build_user:
|
|||||||
group: talexander
|
group: talexander
|
||||||
jail_zfs_dataset: zmass/encrypted/jails
|
jail_zfs_dataset: zmass/encrypted/jails
|
||||||
jail_zfs_dataset_mountpoint: /jail/main
|
jail_zfs_dataset_mountpoint: /jail/main
|
||||||
|
jail_canmount: "on"
|
||||||
|
jail_bemount: "on"
|
||||||
jail_list:
|
jail_list:
|
||||||
- name: cloak
|
- name: cloak
|
||||||
conf:
|
conf:
|
||||||
@ -34,3 +36,5 @@ jail_list:
|
|||||||
mount: /var/db/murmur
|
mount: /var/db/murmur
|
||||||
bhyve_dataset: zmass/encrypted/vm
|
bhyve_dataset: zmass/encrypted/vm
|
||||||
bhyve_list: []
|
bhyve_list: []
|
||||||
|
bhyve_canmount: "on"
|
||||||
|
bhyve_bemount: "on"
|
||||||
|
@ -2,29 +2,29 @@
|
|||||||
vars:
|
vars:
|
||||||
ansible_become: True
|
ansible_become: True
|
||||||
roles:
|
roles:
|
||||||
- sudo
|
# - sudo
|
||||||
- users
|
- users
|
||||||
- package_manager
|
# - package_manager
|
||||||
- zrepl
|
# - zrepl
|
||||||
- zsh
|
# - zsh
|
||||||
- network
|
# - network
|
||||||
- sshd
|
# - sshd
|
||||||
- base
|
# - base
|
||||||
- firewall
|
# - firewall
|
||||||
- cpu
|
# - cpu
|
||||||
- ntp
|
# - ntp
|
||||||
- build
|
# - build
|
||||||
- graphics
|
# - graphics
|
||||||
- gpg
|
# - gpg
|
||||||
- fonts
|
# - fonts
|
||||||
- alacritty
|
# - alacritty
|
||||||
- sway
|
# - sway
|
||||||
- emacs
|
# - emacs
|
||||||
- firefox
|
# - firefox
|
||||||
- devfs
|
# - devfs
|
||||||
- ssh_client
|
# - ssh_client
|
||||||
- jail
|
- jail
|
||||||
- fuse
|
# - fuse
|
||||||
- autofs
|
# - autofs
|
||||||
- exfat
|
# - exfat
|
||||||
- bhyve
|
- bhyve
|
||||||
|
@ -19,8 +19,8 @@
|
|||||||
state: present
|
state: present
|
||||||
extra_zfs_properties:
|
extra_zfs_properties:
|
||||||
mountpoint: "{{ bhyve_mountpoint }}"
|
mountpoint: "{{ bhyve_mountpoint }}"
|
||||||
canmount: "noauto"
|
canmount: "{{ bhyve_canmount|default('noauto') }}"
|
||||||
"ta:bemount": "on"
|
"ta:bemount": "{{ bhyve_bemount|default('on') }}"
|
||||||
|
|
||||||
- name: Enable bhyve
|
- name: Enable bhyve
|
||||||
community.general.sysrc:
|
community.general.sysrc:
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
zfs:
|
zfs:
|
||||||
name: "{{ item.dataset|default(jail_zfs_dataset) }}/jails/{{ item.name }}"
|
name: "{{ item.dataset|default(jail_zfs_dataset) }}/jails/{{ item.name }}"
|
||||||
state: present
|
state: present
|
||||||
extra_zfs_properties: '{{ {''mountpoint'': item.dataset_mountpoint|default(jail_zfs_dataset_mountpoint) + "/jails/" + item.name}|combine(item.properties|default({}))|combine({''canmount'': ''noauto'', ''ta:bemount'': ''on''}) }}'
|
extra_zfs_properties: '{{ {''mountpoint'': item.dataset_mountpoint|default(jail_zfs_dataset_mountpoint) + "/jails/" + item.name}|combine({''canmount'': jail_canmount|default(''noauto''), ''ta:bemount'': jail_bemount|default(''on'')})|combine(item.properties|default({})) }}'
|
||||||
|
|
||||||
loop: "{{ jail_list }}"
|
loop: "{{ jail_list }}"
|
||||||
|
|
||||||
@ -27,7 +27,7 @@
|
|||||||
zfs:
|
zfs:
|
||||||
name: "{{ item.0.dataset|default(jail_zfs_dataset) }}/persistent/{{ item.0.name }}/{{ item.1.name }}"
|
name: "{{ item.0.dataset|default(jail_zfs_dataset) }}/persistent/{{ item.0.name }}/{{ item.1.name }}"
|
||||||
state: present
|
state: present
|
||||||
extra_zfs_properties: '{{ {''mountpoint'': item.0.dataset_mountpoint|default(jail_zfs_dataset_mountpoint) + "/jails/" + item.0.name + item.1.mount }|combine(item.1.properties|default({}))|combine({''canmount'': ''noauto'', ''ta:bemount'': ''on''}) }}'
|
extra_zfs_properties: '{{ {''mountpoint'': item.0.dataset_mountpoint|default(jail_zfs_dataset_mountpoint) + "/jails/" + item.0.name + item.1.mount }|combine({''canmount'': jail_canmount|default(''noauto''), ''ta:bemount'': jail_bemount|default(''on'')})|combine(item.1.properties|default({})) }}'
|
||||||
loop: "{{ jail_list|subelements('persist', skip_missing=True) }}"
|
loop: "{{ jail_list|subelements('persist', skip_missing=True) }}"
|
||||||
|
|
||||||
- name: Install scripts
|
- name: Install scripts
|
||||||
|
Loading…
Reference in New Issue
Block a user