add nas variable and playbook

This commit is contained in:
vincent 2022-12-10 11:07:18 +01:00
parent 3628139699
commit 8081e89176
2 changed files with 25 additions and 0 deletions

View File

@ -0,0 +1,11 @@
nfs_cluster_list: "{% for server in groups[all]%}{{hostvars[server][inventory_hostname]}} (rw,async,all_squash,insecure_locks,sec=sys,anonuid=1024,anongid=100) {%endfor%}"
nfs_exports:
- "/var/local/volume1/nomad {{nfs_cluster_list}}"
- "/var/local/volume1/music {{nfs_cluster_list}}"
- "/var/local/volume1/media {{nfs_cluster_list}}"
- "/var/local/volume1/photo {{nfs_cluster_list}}"
- "/var/local/volume1/ebook {{nfs_cluster_list}}"
- "/var/local/volume1/git {{nfs_cluster_list}}"

14
ansible/playbooks/nas.yml Normal file
View File

@ -0,0 +1,14 @@
---
- hosts: NAS
vars:
# certbot_force: true
roles:
- system
- role: msmtp
when: ansible_os_family != "RedHat"
- role: ansible-role-nfs
# - cronie
#- ldap
#- samba
#- ftp