38 lines
901 B
YAML
38 lines
901 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: "{{ nfs_bind_source }}"
|
|
become: true
|
|
|
|
- name: Bind NFS export
|
|
ansible.posix.mount:
|
|
path: "{{ nfs_bind_target }}/{{ item.split('/')[-1] }}"
|
|
src: "{{ item }}"
|
|
opts: bind
|
|
fstype: none
|
|
state: mounted
|
|
loop: "{{ nfs_bind_source }}"
|
|
become: true
|
|
- name: create nomad folder
|
|
file:
|
|
path: "{{ nfs_bind_target}}/nomad/{{item.name}}"
|
|
owner: "{{item.owner}}"
|
|
state: directory
|
|
loop: "{{ NAS_nomad_folder }}"
|
|
become: true
|
|
roles:
|
|
- role: ansible-role-nfs
|
|
become: true
|
|
- role: ansible-role-vsftpd
|
|
become: true
|
|
#- samba
|