ansible/roles/steamgame/tasks/main.yml

28 lines
721 B
YAML

#!/usr/bin/ansible-playbook
# vim:ft=ansible:
---
- name: Install Steam game
block:
- name: "Install game {{ steam_appid }}"
command:
argv:
- /usr/games/steamcmd
- +login
- anonymous
- +app_update
- "{{ steam_appid }}"
# - validate
- +quit
creates: "$HOME/.steam/SteamApps/common/{{ steam_path }}"
- name: Create quick-access dir
file:
path: $HOME/games
state: directory
- name: Symlink game to quick-access dir
file:
src: "$HOME/.steam/SteamApps/common/{{ steam_path }}"
path: "/var/steam/games/{{ steam_appid }}"
state: link
become: yes
become_user: steamcmd