Update inventory, add a new steamcmd role

This commit is contained in:
Salt 2020-07-05 09:26:21 -05:00
parent 8946e7284f
commit 61ed816059
3 changed files with 40 additions and 0 deletions

View File

@ -28,3 +28,5 @@ all:
ansible_host: game1.9iron.club
game2:
ansible_host: game2.9iron.club
game3:
ansible_host: game3.9iron.club

View File

@ -61,3 +61,7 @@
mcviewdist: 14
mcleveltype: "default"
tags: [ gameserver, minecraft, magicpack ]
- hosts: game3
roles:
- role: steamcmd
tags: [ steamcmd ]

View File

@ -0,0 +1,34 @@
#!/usr/bin/ansible-playbook
# vim:ft=ansible:
---
- name: Install steamcmd
block:
- name: Enable i386 architecture
lineinfile:
dest: /var/lib/dpkg/arch
line: i386
create: yes
register: add_i386
- name: Update repos
apt:
update_cache: yes
when: add_i386 is changed
- name: Configure debconf
debconf:
name: steamcmd
question: "steam/question"
value: "I AGREE"
vtype: string
- name: Install steamcmd
apt:
name: steamcmd
environment:
ACCEPT_EULA: "Y"
- name: Create steamcmd user
user:
name: steamcmd
password: "!"
home: "/var/steam"
shell: "/bin/bash"
system: yes
become: yes