homelab/ansible/playbooks/nas.yml

31 lines
687 B
YAML
Raw Normal View History

2022-12-10 10:07:18 +00:00
---
2024-01-13 17:34:04 +00:00
- name: gather all
hosts: all
2024-01-13 17:32:02 +00:00
- name: NAS playbook
hosts: NAS
2022-12-10 10:07:18 +00:00
vars:
# certbot_force: true
2024-01-13 17:32:02 +00:00
pre_tasks:
2024-02-04 20:23:17 +00:00
- name: Ensure base NFS directory exist
ansible.builtin.file:
path: "{{ item }}"
state: directory
loop: "{{ nfs_bind_source }}"
become: true
2024-01-13 17:32:02 +00:00
- name: Bind NFS export
ansible.posix.mount:
path: "{{ nfs_bind_target }}/{{ item.split('/')[-1] }}"
2024-01-13 17:34:04 +00:00
src: "{{ item }}"
2024-01-13 17:32:02 +00:00
opts: bind
fstype: none
state: mounted
2024-01-13 17:34:04 +00:00
loop: "{{ nfs_bind_source }}"
become: true
2022-12-10 10:07:18 +00:00
roles:
2024-01-13 17:32:02 +00:00
- role: ansible-role-nfs
2023-11-15 18:24:32 +00:00
become: true
2024-01-13 17:32:02 +00:00
- role: ansible-role-vsftpd
2023-11-15 18:24:32 +00:00
become: true
2022-12-10 10:07:18 +00:00
#- samba