From 8c539342cb9d5e1cd339ba4cc493eb5366a5f94d Mon Sep 17 00:00:00 2001 From: vincent Date: Sat, 10 Dec 2022 11:07:18 +0100 Subject: [PATCH] add nas variable and playbook --- ansible/group_vars/NAS/main | 11 +++++++++++ ansible/playbooks/nas.yml | 14 ++++++++++++++ 2 files changed, 25 insertions(+) create mode 100644 ansible/group_vars/NAS/main create mode 100644 ansible/playbooks/nas.yml diff --git a/ansible/group_vars/NAS/main b/ansible/group_vars/NAS/main new file mode 100644 index 0000000..bd76058 --- /dev/null +++ b/ansible/group_vars/NAS/main @@ -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}}" + diff --git a/ansible/playbooks/nas.yml b/ansible/playbooks/nas.yml new file mode 100644 index 0000000..2a355b2 --- /dev/null +++ b/ansible/playbooks/nas.yml @@ -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 +