Adding multiples ansible roles, playbooks and inventory
This commit is contained in:
11
roles/steamcmd/tasks/install_gameserver.yml
Normal file
11
roles/steamcmd/tasks/install_gameserver.yml
Normal file
@@ -0,0 +1,11 @@
|
||||
---
|
||||
- name: Create specific {{ steam_cmd_game_name }} server directory
|
||||
ansible.builtin.file:
|
||||
path: "{{ steamcmd_game_server_path }}"
|
||||
state: directory
|
||||
mode: 755
|
||||
|
||||
- name: Install game server from steamcmd
|
||||
ansible.builtin.shell: /usr/games/steamcmd +force_install_dir "{{ steamcmd_game_server_path }}" +login anonymous +app_update "{{ steamcmd_game_server_id }}" +quit
|
||||
args:
|
||||
executable: /bin/bash
|
||||
31
roles/steamcmd/tasks/install_steamcmd.yml
Normal file
31
roles/steamcmd/tasks/install_steamcmd.yml
Normal file
@@ -0,0 +1,31 @@
|
||||
---
|
||||
- name: Update APT cache
|
||||
ansible.builtin.apt:
|
||||
update_cache: yes
|
||||
|
||||
- name: Install software-properties-common package (Debian)
|
||||
ansible.builtin.apt:
|
||||
name: software-properties-common
|
||||
update_cache: yes
|
||||
|
||||
- name: Install sudo package (Debian)
|
||||
ansible.builtin.apt:
|
||||
name: sudo
|
||||
|
||||
- name: Install steamcmd on debian 12
|
||||
ansible.builtin.shell: |
|
||||
sudo apt update -y; sudo apt install software-properties-common -y ; sudo apt-add-repository non-free -y; sudo dpkg --add-architecture i386; sudo apt update -y
|
||||
sudo apt install steamcmd -y
|
||||
|
||||
|
||||
# - name: Install dependences and steamcmd package
|
||||
# ansible.builtin.shell: |
|
||||
# apt upgrade -y
|
||||
# apt-add-repository -yn non-free non-free-firmware
|
||||
# dpkg --add-architecture i386
|
||||
# echo steam steam/license note '' | debconf-set-selections
|
||||
# echo steam steam/question select "I AGREE" | debconf-set-selections
|
||||
# apt update -y
|
||||
# ACCEPT_EULA=Y apt install steamcmd -y
|
||||
# args:
|
||||
# executable: /bin/bash
|
||||
19
roles/steamcmd/tasks/main.yml
Normal file
19
roles/steamcmd/tasks/main.yml
Normal file
@@ -0,0 +1,19 @@
|
||||
---
|
||||
- name: SteamCMD Installer
|
||||
include_tasks:
|
||||
file: install_steamcmd.yml
|
||||
apply:
|
||||
tags:
|
||||
- install_steamcmd
|
||||
tags:
|
||||
- always
|
||||
|
||||
|
||||
- name: SteamCMD - Install game server
|
||||
include_tasks:
|
||||
file: install_gameserver.yml
|
||||
apply:
|
||||
tags:
|
||||
- install_gameserver
|
||||
tags: always
|
||||
...
|
||||
3
roles/steamcmd/vars/main.yml
Normal file
3
roles/steamcmd/vars/main.yml
Normal file
@@ -0,0 +1,3 @@
|
||||
steam_cmd_game_name: ark
|
||||
steamcmd_game_server_path: "/srv/{{ steam_cmd_game_name }}"
|
||||
steamcmd_game_server_id: 376030
|
||||
Reference in New Issue
Block a user