-
Notifications
You must be signed in to change notification settings - Fork 0
/
deployServerNfs.yml
42 lines (38 loc) · 1.34 KB
/
deployServerNfs.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
---
- name : Download CS Server, distribute with shared nfs mount
hosts: cs
gather_facts: False
become_method: sudo
vars:
home: /home/{{service_user}}
tasks:
- name: mkdir nfs mount
file:
path: '{{home}}/nas'
state: directory
owner: '{{service_user}}'
group: '{{service_user}}'
- name: nfs mount nas
mount:
path: '{{home}}/nas'
src: nas.lan.geco.ethz.ch:/mnt/RAID1/csgo
fstype: nfs
state: mounted
boot: False
become: True
- name: download CS:GO Dedicated Server
command: '{{home}}/SteamCMD/steamcmd.sh +login anonymous +force_install_dir {{home}}/nas/cs_clean +app_update 740 +quit'
run_once: true
async: 3600
become: yes
become_user: '{{service_user}}'
- name: copy clean_files to local node
command: nocache cp -r {{home}}/nas/cs_clean {{home}}/cs
async: 3600
become: yes
become_user: '{{service_user}}'
- name: umount nfs freenas
mount:
path: '{{home}}/nas'
state: absent
become: True