Move service directories to /etc/the-nine-worlds
This commit is contained in:
parent
2e4ba59aaf
commit
599dd490ee
@ -41,7 +41,6 @@ system_base_unattended_upgrades_blacklist:
|
|||||||
system_var_root_directory: "/var/lib/yggdrasil"
|
system_var_root_directory: "/var/lib/yggdrasil"
|
||||||
|
|
||||||
system_var_root_dataset: "rpool{{ system_var_root_directory }}"
|
system_var_root_dataset: "rpool{{ system_var_root_directory }}"
|
||||||
system_var_home_dataset: "rpool{{ system_var_home_directory }}"
|
|
||||||
system_var_data_dataset: "rpool{{ system_var_data_directory }}"
|
system_var_data_dataset: "rpool{{ system_var_data_directory }}"
|
||||||
system_var_containers_dataset: "rpool{{ system_var_containers_directory }}"
|
system_var_containers_dataset: "rpool{{ system_var_containers_directory }}"
|
||||||
|
|
||||||
@ -138,7 +137,6 @@ music_user_nextcloud_videos_pswd: "{{ vault_music_user_nextcloud_videos_pswd }}"
|
|||||||
# services
|
# services
|
||||||
# --------------------------------------------------------------------------------------------------
|
# --------------------------------------------------------------------------------------------------
|
||||||
services_root_dataset: "{{ system_var_root_dataset }}"
|
services_root_dataset: "{{ system_var_root_dataset }}"
|
||||||
services_home_dataset: "{{ system_var_home_dataset }}"
|
|
||||||
services_data_dataset: "{{ system_var_data_dataset }}"
|
services_data_dataset: "{{ system_var_data_dataset }}"
|
||||||
services_containers_dataset: "{{ system_var_containers_dataset }}"
|
services_containers_dataset: "{{ system_var_containers_dataset }}"
|
||||||
|
|
||||||
|
@ -13,10 +13,7 @@ argument_specs:
|
|||||||
required: true
|
required: true
|
||||||
services_home_dataset:
|
services_home_dataset:
|
||||||
type: "str"
|
type: "str"
|
||||||
required: true
|
required: false
|
||||||
services_data_dataset:
|
services_data_dataset:
|
||||||
type: "str"
|
type: "str"
|
||||||
required: true
|
required: false
|
||||||
services_home_directory:
|
|
||||||
type: "str"
|
|
||||||
required: true
|
|
||||||
|
@ -4,31 +4,40 @@
|
|||||||
name: "services/include"
|
name: "services/include"
|
||||||
vars_from: "user"
|
vars_from: "user"
|
||||||
|
|
||||||
- name: "{{ services_service_name }} : create home dataset"
|
- block:
|
||||||
community.general.zfs:
|
- name: "{{ services_service_name }} : create home dataset"
|
||||||
name: "{{ services_home_dataset }}/{{ services_service_user_name }}"
|
community.general.zfs:
|
||||||
state: "present"
|
name: "{{ services_home_dataset }}/{{ services_service_user_name }}"
|
||||||
register: services_datasets_user_zfs_home
|
state: "present"
|
||||||
|
register: services_datasets_user_zfs_home
|
||||||
|
|
||||||
|
- name: "{{ services_service_name }} : populate home dataset with skeleton"
|
||||||
|
ansible.builtin.copy:
|
||||||
|
src: "/etc/skel/"
|
||||||
|
dest: "{{ services_service_user_home }}"
|
||||||
|
mode: "preserve"
|
||||||
|
remote_src: true
|
||||||
|
when:
|
||||||
|
services_datasets_user_zfs_home.changed
|
||||||
|
|
||||||
- name: "{{ services_service_name }} : populate home dataset with skeleton"
|
|
||||||
ansible.builtin.copy:
|
|
||||||
src: "/etc/skel/"
|
|
||||||
dest: "{{ services_service_user_home }}"
|
|
||||||
mode: "preserve"
|
|
||||||
remote_src: true
|
|
||||||
when:
|
when:
|
||||||
services_datasets_user_zfs_home.changed
|
services_home_dataset is defined
|
||||||
|
|
||||||
- name: "{{ services_service_name }} : create data dataset"
|
- block:
|
||||||
community.general.zfs:
|
- name: "{{ services_service_name }} : create data dataset"
|
||||||
name: "{{ services_data_dataset }}/{{ services_service_user_name }}"
|
community.general.zfs:
|
||||||
state: "present"
|
name: "{{ services_data_dataset }}/{{ services_service_user_name }}"
|
||||||
extra_zfs_properties:
|
state: "present"
|
||||||
canmount: "off"
|
extra_zfs_properties:
|
||||||
|
canmount: "off"
|
||||||
|
|
||||||
- name: "{{ services_service_name }} : create volume datasets"
|
- name: "{{ services_service_name }} : create volume datasets"
|
||||||
community.general.zfs:
|
community.general.zfs:
|
||||||
name: "{{ services_data_dataset }}/{{ services_service_user_name }}/{{ item.key }}"
|
name: "{{ services_data_dataset }}/{{ services_service_user_name }}/{{ item.key }}"
|
||||||
state: "present"
|
state: "present"
|
||||||
extra_zfs_properties: "{{ item.value.extra_zfs_properties | default({}) }}"
|
extra_zfs_properties: "{{ item.value.extra_zfs_properties | default({}) }}"
|
||||||
loop: "{{ services_service_volumes | dict2items }}"
|
loop: "{{ services_service_volumes | dict2items }}"
|
||||||
|
|
||||||
|
|
||||||
|
when:
|
||||||
|
services_data_dataset is defined
|
||||||
|
@ -8,9 +8,6 @@ argument_specs:
|
|||||||
system_var_root_dataset:
|
system_var_root_dataset:
|
||||||
type: "str"
|
type: "str"
|
||||||
required: true
|
required: true
|
||||||
system_var_home_dataset:
|
|
||||||
type: "str"
|
|
||||||
required: true
|
|
||||||
system_var_data_dataset:
|
system_var_data_dataset:
|
||||||
type: "str"
|
type: "str"
|
||||||
required: true
|
required: true
|
||||||
|
@ -46,10 +46,3 @@
|
|||||||
state: "present"
|
state: "present"
|
||||||
extra_zfs_properties:
|
extra_zfs_properties:
|
||||||
canmount: "off"
|
canmount: "off"
|
||||||
|
|
||||||
- name: "var : create home root dataset"
|
|
||||||
community.general.zfs:
|
|
||||||
name: "{{ system_var_home_dataset }}"
|
|
||||||
state: "present"
|
|
||||||
extra_zfs_properties:
|
|
||||||
canmount: "off"
|
|
||||||
|
Loading…
Reference in New Issue
Block a user