From 27924b54d71fea4cf3b94e3e5f0978a05c54e7c0 Mon Sep 17 00:00:00 2001 From: vincent Date: Sat, 23 Dec 2023 20:57:46 +0100 Subject: [PATCH] by mount enable option instead dedicated variable --- ansible/group_vars/VPS/mount | 6 ++---- ansible/group_vars/homelab/mount | 22 ++++++++++------------ ansible/group_vars/production | 1 - 3 files changed, 12 insertions(+), 17 deletions(-) diff --git a/ansible/group_vars/VPS/mount b/ansible/group_vars/VPS/mount index 74252db..d410b54 100644 --- a/ansible/group_vars/VPS/mount +++ b/ansible/group_vars/VPS/mount @@ -6,6 +6,7 @@ systemd_mounts: options: - " " automount: "{{ env_automount }}" + enabled: true hetzner_storage: share: //u304977.your-storagebox.de/backup mount: /mnt/hetzner/storagebox @@ -17,6 +18,7 @@ systemd_mounts: - vers=3.0 - mfsymlinks automount: "{{ env_automount }}" + enabled: true credentials_files: 1: @@ -24,7 +26,3 @@ credentials_files: path: /etc/creds/hetzner_credentials username: u304977 password: "{{ lookup('hashi_vault','secret=secrets/data/ansible/storage:hetzner') }}" - -systemd_mounts_enabled: - - diskstation_nomad - - hetzner_storage diff --git a/ansible/group_vars/homelab/mount b/ansible/group_vars/homelab/mount index dde5915..eaded68 100644 --- a/ansible/group_vars/homelab/mount +++ b/ansible/group_vars/homelab/mount @@ -6,6 +6,7 @@ systemd_mounts: options: - " " automount: "{{ env_automount }}" + enabled: true diskstation_CardDav: share: "{{ nas_ip }}:{{ env_default_nfs_path }}/CardDav" mount: /mnt/diskstation/CardDav @@ -13,6 +14,7 @@ systemd_mounts: options: - " " automount: "{{ env_automount }}" + enabled: true backup_disk: share: /dev/sdb1 mount: /mnt/backup @@ -20,6 +22,7 @@ systemd_mounts: options: - " " automount: "{{ env_automount }}" + enabled: "{%if inventory_hostname in groups['staging'] %} false {% else %} true {% endif %}" diskstation_home: share: "{{ nas_ip }}:{{ env_default_nfs_path }}/homes/admin" mount: /mnt/diskstation/home @@ -27,6 +30,7 @@ systemd_mounts: options: - " " automount: "{{ env_automount }}" + enabled: true diskstation_photo: share: "{{ nas_ip }}:{{ env_default_nfs_path }}/photo" mount: /mnt/diskstation/photo @@ -34,6 +38,7 @@ systemd_mounts: options: - " " automount: "{{ env_automount }}" + enabled: true diskstation_music: share: "{{ nas_ip }}:{{ env_default_nfs_path }}/music" mount: /mnt/diskstation/music @@ -41,6 +46,7 @@ systemd_mounts: options: - " " automount: "{{ env_automount }}" + enabled: true diskstation_media: share: "{{ nas_ip }}:{{ env_default_nfs_path }}/media" mount: /mnt/diskstation/media @@ -48,6 +54,7 @@ systemd_mounts: options: - " " automount: "{{ env_automount }}" + enabled: true diskstation_ebook: share: "{{ nas_ip }}:{{ env_default_nfs_path }}/ebook" mount: /mnt/diskstation/ebook @@ -55,6 +62,7 @@ systemd_mounts: options: - " " automount: "{{ env_automount }}" + enabled: true diskstation_archMirror: share: "{{ nas_ip }}:{{ env_default_nfs_path }}/archMirror" mount: /mnt/diskstation/archMirror @@ -62,6 +70,7 @@ systemd_mounts: options: - " " automount: "{{ env_automount }}" + enabled: true diskstation_nomad: share: "{{ nas_ip }}:{{ env_default_nfs_path }}/nomad" mount: /mnt/diskstation/nomad @@ -69,15 +78,4 @@ systemd_mounts: options: - " " automount: "{{ env_automount }}" - -systemd_mounts_enabled: - - diskstation_git - - diskstation_music - - backup_disk - - diskstation_photo - - diskstation_home - - diskstation_CardDav - - diskstation_media - - diskstation_ebook - - diskstation_archMirror - - diskstation_nomad + enabled: true diff --git a/ansible/group_vars/production b/ansible/group_vars/production index c877722..541e8df 100644 --- a/ansible/group_vars/production +++ b/ansible/group_vars/production @@ -4,7 +4,6 @@ consul_bootstrap_expect: 3 consul_domain: "consul" nomad_bootstrap_expect: 3 vault_unseal_keys_dir_output: "~/vaultUnseal/production" -nfs_domain_name: {{ domain_name}} env_default_nfs_path: "/volume2" env_media_nfs_path: "/volume1" env_automount: true