-
Notifications
You must be signed in to change notification settings - Fork 9
Creating an insta LANparty with AppImages and Ansible
Ismael Barros² edited this page May 8, 2015
·
1 revision
This guide will allow you to setup a script that copies an AppImage to multiple computers in parallel and runs the package on all of them, perfect to quickly distribute games on a LAN party.
Edit this file and list all the computers you want to run the game on.
/etc/ansible/hosts
[lan]
192.168.69.42
192.168.69.32
192.168.69.33
192.168.69.30
192.168.69.35
Place this file anywhere you want, and customize it to suit your AppImage, user, paths, etc.
quake.yml
---
- hosts: lan
remote_user: user
vars:
AppImage: "/home/user/AppImages/ioQuake\ III\ Arena\ XCSV\ Demo\ 1.36-r2-x86.run"
InstallPath: ".cache/"
tasks:
- name: Install game
copy: src="{{ AppImage }}" dest="{{ InstallPath }}/Game.run" mode=0744
- name: Run game
command: "{{ item }} chdir={{ InstallPath }}"
with_items:
- "zenity --error --text=\"All your base are belong to us\" --timeout=1"
- "./Game.run +connect 192.168.69.13"
environment:
DISPLAY: :0
Run this command on your shell
$ ansible-playbook quake.yml
This will take a while the first time, because it needs to copy the AppImage to all computers, but after that it'll detect the package is already copied and just run all the clients, which will start up at exactly the same time and connect to your server (make sure it's running).