Create external directories
This commit is contained in:
parent
2725962e05
commit
64c54f67f6
@ -63,6 +63,10 @@ system_external_dataset: "hpool/external"
|
|||||||
system_external_root_dataset: "{{ system_external_dataset }}/the-nine-worlds"
|
system_external_root_dataset: "{{ system_external_dataset }}/the-nine-worlds"
|
||||||
system_external_data_dataset: "{{ system_external_root_dataset }}/data"
|
system_external_data_dataset: "{{ system_external_root_dataset }}/data"
|
||||||
|
|
||||||
|
system_external_directory: "/media/hpool/external"
|
||||||
|
system_external_root_directory: "{{ system_external_directory }}/the-nine-worlds"
|
||||||
|
system_external_data_directory: "{{ system_external_root_directory }}/data"
|
||||||
|
|
||||||
# --------------------------------------------------------------------------------------------------
|
# --------------------------------------------------------------------------------------------------
|
||||||
# vpn
|
# vpn
|
||||||
# --------------------------------------------------------------------------------------------------
|
# --------------------------------------------------------------------------------------------------
|
||||||
@ -149,6 +153,8 @@ services_data_dataset: "{{ system_var_data_dataset }}"
|
|||||||
services_containers_dataset: "{{ system_var_containers_dataset }}"
|
services_containers_dataset: "{{ system_var_containers_dataset }}"
|
||||||
services_external_dataset: "{{ system_external_data_dataset }}"
|
services_external_dataset: "{{ system_external_data_dataset }}"
|
||||||
|
|
||||||
|
services_external_directory: "{{ system_external_data_directory }}"
|
||||||
|
|
||||||
services_host_services:
|
services_host_services:
|
||||||
lrproxy:
|
lrproxy:
|
||||||
inet_address: "{{ vpn_bridge_inet_prefix }}.2"
|
inet_address: "{{ vpn_bridge_inet_prefix }}.2"
|
||||||
|
@ -2,5 +2,6 @@
|
|||||||
services_service_user_name: "pod-{{ services_service_name }}"
|
services_service_user_name: "pod-{{ services_service_name }}"
|
||||||
services_service_user_home: "{{ services_home_directory }}/{{ services_service_user_name }}"
|
services_service_user_home: "{{ services_home_directory }}/{{ services_service_user_name }}"
|
||||||
services_service_user_data: "{{ services_data_directory }}/{{ services_service_user_name }}"
|
services_service_user_data: "{{ services_data_directory }}/{{ services_service_user_name }}"
|
||||||
|
services_service_user_external: "{{ services_external_directory }}/{{ services_service_user_name }}"
|
||||||
services_service_user_containers: "\
|
services_service_user_containers: "\
|
||||||
{{ services_containers_directory }}/{{ services_service_user_name }}"
|
{{ services_containers_directory }}/{{ services_service_user_name }}"
|
||||||
|
@ -15,8 +15,24 @@
|
|||||||
group: "{{ services_service_user_name }}"
|
group: "{{ services_service_user_name }}"
|
||||||
mode: 0755
|
mode: 0755
|
||||||
|
|
||||||
|
- name: "{{ services_service_name }} : directories : create external directory"
|
||||||
|
ansible.builtin.file:
|
||||||
|
path: "{{ services_service_user_external }}"
|
||||||
|
state: "directory"
|
||||||
|
owner: "{{ services_service_user_name }}"
|
||||||
|
group: "{{ services_service_user_name }}"
|
||||||
|
mode: 0755
|
||||||
|
|
||||||
- name: "{{ services_service_name }} : directories : create volume directories"
|
- name: "{{ services_service_name }} : directories : create volume directories"
|
||||||
ansible.builtin.include_tasks: "directories/volumes.yml"
|
ansible.builtin.include_tasks: "directories/volumes.yml"
|
||||||
|
vars:
|
||||||
|
services_service_volume_root_directory: "\
|
||||||
|
{% if services_service_volume.value.external is defined and \
|
||||||
|
services_service_volume.value.external %}\
|
||||||
|
{{ services_service_user_external }}\
|
||||||
|
{% else %}\
|
||||||
|
{{ services_service_user_data }}\
|
||||||
|
{% endif %}"
|
||||||
loop: "{{ services_service_volumes | dict2items }}"
|
loop: "{{ services_service_volumes | dict2items }}"
|
||||||
loop_control:
|
loop_control:
|
||||||
loop_var: "services_service_volume"
|
loop_var: "services_service_volume"
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
- name: "\
|
- name: "\
|
||||||
{{ services_service_name }} : directories : create volume \"{{ services_service_volume.key }}\""
|
{{ services_service_name }} : directories : create volume \"{{ services_service_volume.key }}\""
|
||||||
ansible.builtin.file:
|
ansible.builtin.file:
|
||||||
path: "{{ services_service_user_data }}/{{ services_service_volume.key }}"
|
path: "{{ services_service_volume_root_directory }}/{{ services_service_volume.key }}"
|
||||||
state: "directory"
|
state: "directory"
|
||||||
owner: "{{ services_service_user_name }}"
|
owner: "{{ services_service_user_name }}"
|
||||||
group: "{{ services_service_user_name }}"
|
group: "{{ services_service_user_name }}"
|
||||||
@ -12,13 +12,13 @@
|
|||||||
{{ services_service_name }} : directories : check if \"{{ services_service_volume.key }}\" \
|
{{ services_service_name }} : directories : check if \"{{ services_service_volume.key }}\" \
|
||||||
mount exists"
|
mount exists"
|
||||||
ansible.builtin.stat:
|
ansible.builtin.stat:
|
||||||
path: "{{ services_service_user_data }}/{{ services_service_volume.key }}/_data"
|
path: "{{ services_service_volume_root_directory }}/{{ services_service_volume.key }}/_data"
|
||||||
register: services_setup_user_volume_mount
|
register: services_setup_user_volume_mount
|
||||||
|
|
||||||
- name: "\
|
- name: "\
|
||||||
{{ services_service_name }} : directories : create \"{{ services_service_volume.key }}\" mount"
|
{{ services_service_name }} : directories : create \"{{ services_service_volume.key }}\" mount"
|
||||||
ansible.builtin.file:
|
ansible.builtin.file:
|
||||||
path: "{{ services_service_user_data }}/{{ services_service_volume.key }}/_data"
|
path: "{{ services_service_volume_root_directory }}/{{ services_service_volume.key }}/_data"
|
||||||
state: "directory"
|
state: "directory"
|
||||||
owner: "{{ services_service_user_name }}"
|
owner: "{{ services_service_user_name }}"
|
||||||
group: "{{ services_service_user_name }}"
|
group: "{{ services_service_user_name }}"
|
||||||
|
Loading…
Reference in New Issue
Block a user