homelab/ansible/playbooks/nas.yml
2024-03-17 11:07:58 +01:00

40 lines
989 B
YAML

---
- name: gather all
hosts: all
- name: NAS playbook
hosts: NAS
vars:
# certbot_force: true
pre_tasks:
- name: Ensure base NFS directory exist
ansible.builtin.file:
path: "{{ item }}"
state: directory
loop: "{{ nas_bind_source }}"
become: true
- name: Bind NAS export
ansible.posix.mount:
path: "{{ nas_bind_target }}/{{ item.split('/')[-1] }}"
src: "{{ item }}"
opts: bind
fstype: none
state: mounted
loop: "{{ nas_bind_source }}"
become: true
- name: create nomad folder
ansible.builtin.file:
path: "{{ nas_bind_target }}/nomad/{{ item.name }}"
owner: "{{ item.owner }}"
state: directory
loop: "{{ NAS_nomad_folder }}"
become: true
roles:
- role: ansible-role-nut
- role: ansible-role-nfs
become: true
- role: ansible-role-vsftpd
become: true
- role: vladgh.samba.server
become: true