-
Notifications
You must be signed in to change notification settings - Fork 18
/
dev-workers_playbook.yml
73 lines (73 loc) · 2.1 KB
/
dev-workers_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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
- hosts: dev_workers
become: true
vars_files:
- group_vars/all.yml
- group_vars/dev.yml
- group_vars/VAULT
- group_vars/dev_slurm.yml
- group_vars/dev_workers.yml
- secret_group_vars/stats_server_vault
pre_tasks:
- name: Attach volume to instance
include_role:
name: attached-volumes
- name: Run the common role first
include_role:
name: common
- name: Include the cvmfs role
include_role:
name: galaxyproject.cvmfs
when: "{{ hostname.startswith('dev-w1') }}"
- name: Include the s3fs role
include_role:
name: galaxyproject.s3fs
when: "{{ hostname.startswith('dev-w2') }}"
roles:
- insspb.hostname
- geerlingguy.pip
- mounts
- galaxyproject.repos
- galaxyproject.slurm
- geerlingguy.docker
- gantsign.golang
- cyverse-ansible.singularity
- dj-wasabi.telegraf
- acl-on-startup
- clean-tmpdisk
post_tasks:
- name: restart munge
systemd:
name: munge
state: restarted
- name: Move /tmp to /mnt
block:
- name: Create worker tmpdir on /mnt
file:
path: /mnt/tmpdisk
state: directory
owner: root
group: root
mode: '1777'
- name: stat links
stat:
path: /tmp
register: links
- name: remove old tmp
file:
path: /tmp
state: absent
when: links.stat.islnk is defined and not links.stat.islnk
- name: Link /tmp to /mnt/tmpdisk
file:
src: /mnt/tmpdisk
dest: /tmp
state: link
become: yes
become_user: root
when: links.stat.islnk is defined and not links.stat.islnk
when: attached_volumes is defined
- name: Reload cvmfs config
command:
cmd: cvmfs_config reload
become: yes
when: "{{ hostname.startswith('dev-w1') }}"