Move services home directory

This commit is contained in:
Wojciech Kozlowski 2023-09-30 00:45:24 +02:00
parent cad31db238
commit 18e58d09fe
4 changed files with 18 additions and 16 deletions

View File

@ -23,6 +23,7 @@ system_mail_smtp_user: "{{ vault_system_mail_smtp_user }}"
# system:var
# --------------------------------------------------------------------------------------------------
system_etc_root_directory: "/etc/the-nine-worlds"
system_var_root_directory: "/var/lib/the-nine-worlds"
# --------------------------------------------------------------------------------------------------
# vpn

View File

@ -2,8 +2,7 @@
# --------------------------------------------------------------------------------------------------
# system:var
# --------------------------------------------------------------------------------------------------
system_var_root_directory: "/var/lib/the-nine-worlds"
system_var_home_directory: "{{ system_var_root_directory }}/home"
system_etc_home_directory: "{{ system_etc_root_directory }}/services"
system_var_data_directory: "{{ system_var_root_directory }}/data"
system_var_containers_directory: "{{ system_var_root_directory }}/containers"
@ -50,7 +49,7 @@ vpn_bridge_dnat: "\
# services
# --------------------------------------------------------------------------------------------------
services_root_directory: "{{ system_var_root_directory }}"
services_home_directory: "{{ system_var_home_directory }}"
services_home_directory: "{{ system_etc_home_directory }}"
services_data_directory: "{{ system_var_data_directory }}"
services_containers_directory: "{{ system_var_containers_directory }}"

View File

@ -17,7 +17,7 @@ argument_specs:
system_var_root_directory:
type: "str"
required: "{{ system_directories_create_var | bool }}"
system_var_home_directory:
system_etc_home_directory:
type: "str"
required: "{{ system_directories_create_var | bool }}"
system_var_data_directory:

View File

@ -1,14 +1,22 @@
---
- name: "create services etc directory"
- block:
- name: "create etc directory"
ansible.builtin.file:
path: "{{ system_etc_root_directory }}"
state: "directory"
mode: 0755
- name: "create home root directory"
ansible.builtin.file:
path: "{{ system_etc_home_directory }}"
state: "directory"
mode: 0755
when:
system_directories_create_etc
- block:
- name: "create services var directory"
- name: "create var directory"
ansible.builtin.file:
path: "{{ system_var_root_directory }}"
state: "directory"
@ -26,11 +34,5 @@
state: "directory"
mode: 0755
- name: "create home root directory"
ansible.builtin.file:
path: "{{ system_var_home_directory }}"
state: "directory"
mode: 0755
when:
system_directories_create_var