Adding a gaming state to install steam and mangohud
This commit is contained in:
@@ -0,0 +1,49 @@
|
||||
# 1. Enable 32-bit architecture required for Steam
|
||||
enable_i386_architecture:
|
||||
cmd.run:
|
||||
- name: dpkg --add-architecture i386
|
||||
- unless: dpkg --print-foreign-architectures | grep -q i386
|
||||
|
||||
{% if grains['os'] == 'Ubuntu' %}
|
||||
# 2a. Ensure universe and multiverse repositories are enabled on Ubuntu
|
||||
enable_ubuntu_repos:
|
||||
pkgrepo.managed:
|
||||
- name: "deb http://archive.ubuntu.com/ubuntu/ {{ grains['oscodename'] }} main restricted universe multiverse"
|
||||
- file: /etc/apt/sources.list.d/official-package-repositories.list
|
||||
- clean_file: True
|
||||
- require_in:
|
||||
- pkg: install_gaming_tools
|
||||
|
||||
{% elif grains['os'] == 'Debian' %}
|
||||
# 2b. Ensure contrib and non-free repositories are enabled on Debian
|
||||
enable_debian_repos:
|
||||
pkgrepo.managed:
|
||||
- name: "deb http://deb.debian.org/debian/ {{ grains['oscodename'] }} main contrib non-free non-free-firmware"
|
||||
- file: /etc/apt/sources.list.d/official-package-repositories.list
|
||||
- clean_file: True
|
||||
- require_in:
|
||||
- pkg: install_gaming_tools
|
||||
{% endif %}
|
||||
|
||||
# 3. Refresh package lists after adding i386 and repositories
|
||||
update_apt_cache:
|
||||
cmd.run:
|
||||
- name: apt-get update
|
||||
- onchanges:
|
||||
- cmd: enable_i386_architecture
|
||||
{% if grains['os'] == 'Ubuntu' %}
|
||||
- pkgrepo: enable_ubuntu_repos
|
||||
{% elif grains['os'] == 'Debian' %}
|
||||
- pkgrepo: enable_debian_repos
|
||||
{% endif %}
|
||||
- require_in:
|
||||
- pkg: install_gaming_tools
|
||||
|
||||
# 4. Install Steam and MangoHud
|
||||
install_gaming_tools:
|
||||
pkg.installed:
|
||||
- pkgs:
|
||||
- steam
|
||||
- mangohud
|
||||
- require:
|
||||
- cmd: enable_i386_architecture
|
||||
Reference in New Issue
Block a user