Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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