-
Notifications
You must be signed in to change notification settings - Fork 0
/
deployBase.yml
47 lines (42 loc) · 1.6 KB
/
deployBase.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
---
- name : Install Base
hosts: cs
gather_facts: False
become_method: sudo
vars:
home: /home/{{service_user}}
tasks:
- name: install packages
apt:
pkg: ['lib32gcc1', 'lib32stdc++6', 'screen', 'rsync', 'netcat-openbsd', 'nocache']
update_cache: yes
cache_valid_time: 3600
state: present
become: True
- name: download SteamCMD
get_url:
url: http://media.steampowered.com/installer/steamcmd_linux.tar.gz
dest: '{{home}}/steamcmd_linux.tar.gz'
owner: '{{service_user}}'
group: '{{service_user}}'
- name: create SteamCMD dir
file:
path: '{{home}}/SteamCMD'
state: directory
owner: '{{service_user}}'
group: '{{service_user}}'
- name: unpack archive
unarchive:
src: '{{home}}/steamcmd_linux.tar.gz'
dest: '{{home}}/SteamCMD/'
copy: no
owner: '{{service_user}}'
group: '{{service_user}}'
- name: delete archive
file:
path: '{{home}}/steamcmd_linux.tar.gz'
state: absent
- name: run SteamCMD
command: '{{home}}/SteamCMD/steamcmd.sh +login anonymous +quit'
become: yes
become_user: '{{service_user}}'