Skip to content

Instantly share code, notes, and snippets.

@RaitoBezarius
Created February 9, 2017 18:13
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save RaitoBezarius/8f4d3df3cdb8182c75ba570b3bdf67a8 to your computer and use it in GitHub Desktop.
Save RaitoBezarius/8f4d3df3cdb8182c75ba570b3bdf67a8 to your computer and use it in GitHub Desktop.
Playbook to reproduce hang bug with auto-install
---
- hosts: gameservers
vars:
lgsm_user: csgoserver
gslt: ""
tasks:
- block:
- name: "Install basic dependencies"
yum: name={{item}} state=latest
with_items:
- mailx
- postfix
- curl
- wget
- bzip2
- gzip
- unzip
- python
- tmux
- glibc.i686
- libstdc++
when: ansible_distribution == "CentOS"
- name: "Install libstdc++.i686"
yum:
name: libstdc++.i686
state: latest
when: ansible_distribution == "CentOS"
- name: Create the "{{ lgsm_user }}" user
user:
name: "{{ lgsm_user }}"
become: true
become_user: 'root'
- block:
- name: Download CS:GO Server
get_url:
url: https://gameservermanagers.com/dl/csgoserver
dest: "/home/{{ lgsm_user }}/csgoserver"
mode: "u+x"
- name: Install LGSM files
shell: ./csgoserver update-functions
- name: Install the other files
shell: ./csgoserver auto-install
- name: Insert the GSLT token
lineinfile:
dest: ./csgoserver
regexp: '^gslt='
line: 'gslt="{{ gslt }}"'
become: true
become_user: "{{ lgsm_user }}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment