forked from usegalaxy-au/infrastructure
-
Notifications
You must be signed in to change notification settings - Fork 0
/
galaxy-misc-nfs_playbook.yml
36 lines (36 loc) · 995 Bytes
/
galaxy-misc-nfs_playbook.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
- hosts: galaxy-misc-nfs
become: true
vars_files:
- group_vars/all.yml
- group_vars/galaxy_etca.yml
- group_vars/VAULT
- group_vars/nfs_servers.yml
- host_vars/galaxy-misc-nfs.usegalaxy.org.au.yml
- secret_group_vars/ubuntu_maintenance_key
- secret_group_vars/stats_server_vault
pre_tasks:
- name: Create nfs directories
file:
path: "{{ item }}"
state: directory
with_items: "{{ nfs_dirs }}"
- name: Attach volume to instance # TODO: Could this role take care of creating the dirs too?
include_role:
name: attached-volumes
roles:
- common
- insspb.hostname
- geerlingguy.pip
- geerlingguy.nfs
- dj-wasabi.telegraf
post_tasks:
- name: Chown shared dirs to Galaxy user
file:
path: "{{ item }}"
owner: galaxy
group: galaxy
with_items: "{{ nfs_dirs }}"
- name: Reload exportfs
command: exportfs -ra
become: yes
become_user: root