by mount enable option instead dedicated variable

This commit is contained in:
vincent 2023-12-23 20:57:46 +01:00
parent c4f1423501
commit ffd597f710
3 changed files with 12 additions and 17 deletions

View File

@ -6,6 +6,7 @@ systemd_mounts:
options: options:
- " " - " "
automount: "{{ env_automount }}" automount: "{{ env_automount }}"
enabled: true
hetzner_storage: hetzner_storage:
share: //u304977.your-storagebox.de/backup share: //u304977.your-storagebox.de/backup
mount: /mnt/hetzner/storagebox mount: /mnt/hetzner/storagebox
@ -17,6 +18,7 @@ systemd_mounts:
- vers=3.0 - vers=3.0
- mfsymlinks - mfsymlinks
automount: "{{ env_automount }}" automount: "{{ env_automount }}"
enabled: true
credentials_files: credentials_files:
1: 1:
@ -24,7 +26,3 @@ credentials_files:
path: /etc/creds/hetzner_credentials path: /etc/creds/hetzner_credentials
username: u304977 username: u304977
password: "{{ lookup('hashi_vault','secret=secrets/data/ansible/storage:hetzner') }}" password: "{{ lookup('hashi_vault','secret=secrets/data/ansible/storage:hetzner') }}"
systemd_mounts_enabled:
- diskstation_nomad
- hetzner_storage

View File

@ -6,6 +6,7 @@ systemd_mounts:
options: options:
- " " - " "
automount: "{{ env_automount }}" automount: "{{ env_automount }}"
enabled: true
diskstation_CardDav: diskstation_CardDav:
share: "{{ nas_ip }}:{{ env_default_nfs_path }}/CardDav" share: "{{ nas_ip }}:{{ env_default_nfs_path }}/CardDav"
mount: /mnt/diskstation/CardDav mount: /mnt/diskstation/CardDav
@ -13,6 +14,7 @@ systemd_mounts:
options: options:
- " " - " "
automount: "{{ env_automount }}" automount: "{{ env_automount }}"
enabled: true
backup_disk: backup_disk:
share: /dev/sdb1 share: /dev/sdb1
mount: /mnt/backup mount: /mnt/backup
@ -20,6 +22,7 @@ systemd_mounts:
options: options:
- " " - " "
automount: "{{ env_automount }}" automount: "{{ env_automount }}"
enabled: "{%if inventory_hostname in groups['staging'] %} false {% else %} true {% endif %}"
diskstation_home: diskstation_home:
share: "{{ nas_ip }}:{{ env_default_nfs_path }}/homes/admin" share: "{{ nas_ip }}:{{ env_default_nfs_path }}/homes/admin"
mount: /mnt/diskstation/home mount: /mnt/diskstation/home
@ -27,6 +30,7 @@ systemd_mounts:
options: options:
- " " - " "
automount: "{{ env_automount }}" automount: "{{ env_automount }}"
enabled: true
diskstation_photo: diskstation_photo:
share: "{{ nas_ip }}:{{ env_default_nfs_path }}/photo" share: "{{ nas_ip }}:{{ env_default_nfs_path }}/photo"
mount: /mnt/diskstation/photo mount: /mnt/diskstation/photo
@ -34,6 +38,7 @@ systemd_mounts:
options: options:
- " " - " "
automount: "{{ env_automount }}" automount: "{{ env_automount }}"
enabled: true
diskstation_music: diskstation_music:
share: "{{ nas_ip }}:{{ env_default_nfs_path }}/music" share: "{{ nas_ip }}:{{ env_default_nfs_path }}/music"
mount: /mnt/diskstation/music mount: /mnt/diskstation/music
@ -41,6 +46,7 @@ systemd_mounts:
options: options:
- " " - " "
automount: "{{ env_automount }}" automount: "{{ env_automount }}"
enabled: true
diskstation_media: diskstation_media:
share: "{{ nas_ip }}:{{ env_default_nfs_path }}/media" share: "{{ nas_ip }}:{{ env_default_nfs_path }}/media"
mount: /mnt/diskstation/media mount: /mnt/diskstation/media
@ -48,6 +54,7 @@ systemd_mounts:
options: options:
- " " - " "
automount: "{{ env_automount }}" automount: "{{ env_automount }}"
enabled: true
diskstation_ebook: diskstation_ebook:
share: "{{ nas_ip }}:{{ env_default_nfs_path }}/ebook" share: "{{ nas_ip }}:{{ env_default_nfs_path }}/ebook"
mount: /mnt/diskstation/ebook mount: /mnt/diskstation/ebook
@ -55,6 +62,7 @@ systemd_mounts:
options: options:
- " " - " "
automount: "{{ env_automount }}" automount: "{{ env_automount }}"
enabled: true
diskstation_archMirror: diskstation_archMirror:
share: "{{ nas_ip }}:{{ env_default_nfs_path }}/archMirror" share: "{{ nas_ip }}:{{ env_default_nfs_path }}/archMirror"
mount: /mnt/diskstation/archMirror mount: /mnt/diskstation/archMirror
@ -62,6 +70,7 @@ systemd_mounts:
options: options:
- " " - " "
automount: "{{ env_automount }}" automount: "{{ env_automount }}"
enabled: true
diskstation_nomad: diskstation_nomad:
share: "{{ nas_ip }}:{{ env_default_nfs_path }}/nomad" share: "{{ nas_ip }}:{{ env_default_nfs_path }}/nomad"
mount: /mnt/diskstation/nomad mount: /mnt/diskstation/nomad
@ -69,15 +78,4 @@ systemd_mounts:
options: options:
- " " - " "
automount: "{{ env_automount }}" automount: "{{ env_automount }}"
enabled: true
systemd_mounts_enabled:
- diskstation_git
- diskstation_music
- backup_disk
- diskstation_photo
- diskstation_home
- diskstation_CardDav
- diskstation_media
- diskstation_ebook
- diskstation_archMirror
- diskstation_nomad

View File

@ -4,7 +4,6 @@ consul_bootstrap_expect: 3
consul_domain: "consul" consul_domain: "consul"
nomad_bootstrap_expect: 3 nomad_bootstrap_expect: 3
vault_unseal_keys_dir_output: "~/vaultUnseal/production" vault_unseal_keys_dir_output: "~/vaultUnseal/production"
nfs_domain_name: {{ domain_name}}
env_default_nfs_path: "/volume2" env_default_nfs_path: "/volume2"
env_media_nfs_path: "/volume1" env_media_nfs_path: "/volume1"
env_automount: true env_automount: true