Update inventory, add a new steamcmd role
This commit is contained in:
parent
8946e7284f
commit
61ed816059
@ -28,3 +28,5 @@ all:
|
||||
ansible_host: game1.9iron.club
|
||||
game2:
|
||||
ansible_host: game2.9iron.club
|
||||
game3:
|
||||
ansible_host: game3.9iron.club
|
||||
|
@ -61,3 +61,7 @@
|
||||
mcviewdist: 14
|
||||
mcleveltype: "default"
|
||||
tags: [ gameserver, minecraft, magicpack ]
|
||||
- hosts: game3
|
||||
roles:
|
||||
- role: steamcmd
|
||||
tags: [ steamcmd ]
|
||||
|
34
roles/steamcmd/tasks/main.yml
Normal file
34
roles/steamcmd/tasks/main.yml
Normal 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
|
Loading…
Reference in New Issue
Block a user