forked from Kauhsa/makkyla-ansible
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Mika Viinamäki
committed
Sep 17, 2017
0 parents
commit 846361a
Showing
11 changed files
with
187 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
*.retry |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
[dedicab] | ||
192.168.1.88 | ||
|
||
[dedicab:vars] | ||
ansible_user=stepmania | ||
ansible_ssh_pass=hulbhulb | ||
ansible_become_pass=hulbhulb | ||
ansible_become_method=su | ||
ansible_become_user=root |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
[Seat:*] | ||
greeter-hide-users=false | ||
autologin-user=stepmania | ||
autologin-session=xfce |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
- name: Install LightDM | ||
apt: | ||
package: lightdm | ||
|
||
- name: Install LightDM configuration | ||
copy: | ||
src: files/custom.conf | ||
dest: /usr/share/lightdm/lightdm.conf.d/99_custom.conf | ||
|
||
- name: Create nopasswdlogin group | ||
group: | ||
name: nopasswdlogin | ||
|
||
- name: Add stepmania to nopasswdlogin group | ||
user: | ||
name: stepmania | ||
groups: nopasswdlogin | ||
append: yes | ||
|
||
- name: Enable passwordless login in PAM | ||
lineinfile: | ||
path: /etc/pam.d/lightdm | ||
line: "auth sufficient pam_succeed_if.so user ingroup nopasswdlogin" | ||
insertafter: "#%PAM-1.0" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
PACKAGE_NAME=piuio | ||
PACKAGE_VERSION={{ PIUIO_VERSION }} | ||
BUILT_MODULE_NAME[0]="$PACKAGE_NAME" | ||
BUILT_MODULE_LOCATION="mod/" | ||
MAKE[0]="make -C ${kernel_source_dir} M=${dkms_tree}/${PACKAGE_NAME}/${PACKAGE_VERSION}/build/mod" | ||
CLEAN="true" | ||
DEST_MODULE_LOCATION[0]=/extra | ||
REMAKE_INITRD=yes | ||
AUTOINSTALL=yes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
- set_fact: PIUIO_VERSION=v1.0 | ||
|
||
- name: Install DKMS | ||
apt: | ||
package: dkms | ||
|
||
- name: Get source | ||
git: | ||
repo: https://github.com/djpohly/piuio | ||
dest: /usr/src/piuio-{{ PIUIO_VERSION }} | ||
version: "{{ PIUIO_VERSION }}" | ||
register: source | ||
|
||
- name: Add DKMS configuration | ||
template: | ||
src: files/dkms.conf | ||
dest: /usr/src/piuio-{{ PIUIO_VERSION }}/dkms.conf | ||
register: config | ||
|
||
- name: Remove old from DKMS | ||
shell: dkms remove -m piuio -v {{ PIUIO_VERSION }} --all || true | ||
when: config.changed or source.changed | ||
|
||
- name: Add to DKMS | ||
shell: dkms add -m piuio -v {{ PIUIO_VERSION }} | ||
when: config.changed or source.changed | ||
|
||
- name: Build and install module | ||
shell: dkms build -m piuio -v {{ PIUIO_VERSION }} && dkms install -m piuio -v {{PIUIO_VERSION}} | ||
when: config.changed or source.changed | ||
|
||
- name: Enable kernel module | ||
modprobe: | ||
name: piuio | ||
|
||
- name: Add to list of automatically load kernel modules | ||
copy: | ||
content: "piuio" | ||
dest: /etc/modules-load.d/piuio.conf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#!/bin/bash | ||
|
||
pasuspender /stepmania/stepmania | ||
|
||
# wait until enter is pressed | ||
read -p "Press enter to continue" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
[Desktop Entry] | ||
Type=Application | ||
Version=1.0 | ||
Name=Stepmania | ||
Path=/stepmania | ||
Exec=/home/stepmania/start-stepmania.sh | ||
Terminal=true | ||
Icon=/stepmania/icons/hicolor/256x256/apps/stepmania-ssc.png |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
## MAIN BUILD | ||
|
||
- name: Install Git | ||
apt: | ||
package: git | ||
|
||
- name: Install Stepmania build dependencies | ||
apt: | ||
package: cmake,build-essential,mesa-common-dev,libglu1-mesa-dev,libglew1.5-dev,libxtst-dev,libxrandr-dev,libpng-dev,libjpeg-dev,zlib1g-dev,libbz2-dev,libogg-dev,libvorbis-dev,libc6-dev,yasm,libasound-dev,libpulse-dev,binutils-dev,libgtk2.0-dev,libmad0-dev,libudev-dev,libva-dev | ||
|
||
- name: Fetch Stepmania source | ||
git: | ||
repo: https://github.com/Kauhsa/stepmania | ||
dest: /stepmania | ||
version: sync-start | ||
register: source | ||
|
||
# -DWITH_MINIMAID=OFF required so we don't get a complain about -fPIC, | ||
# see https://github.com/stepmania/stepmania/issues/1352 | ||
- name: Run CMake | ||
shell: cmake -G 'Unix Makefiles' -DCMAKE_BUILD_TYPE=Release .. -DWITH_MINIMAID=OFF && cmake .. -DWITH_MINIMAID=OFF | ||
args: | ||
chdir: /stepmania/Build | ||
when: source.changed | ||
|
||
- name: Compile Stepmania | ||
shell: make -j$(nproc --all) | ||
args: | ||
chdir: /stepmania/Build | ||
when: source.changed | ||
|
||
## STARTUP SCRIPT | ||
|
||
- name: Copy startup script | ||
copy: | ||
src: files/start.sh | ||
dest: /home/stepmania/start-stepmania.sh | ||
mode: 0755 | ||
|
||
## THEME | ||
|
||
- name: Make sure theme directory exists | ||
file: | ||
path: /home/stepmania/.stepmania-5.0/Themes | ||
state: directory | ||
owner: stepmania | ||
group: stepmania | ||
recurse: yes | ||
|
||
- name: Get Simply Love, McKylä edition | ||
git: | ||
repo: https://github.com/Kauhsa/Simply-Love-SM5 | ||
dest: /home/stepmania/.stepmania-5.0/Themes/Simply-Love-SM5 | ||
version: makkyla | ||
become_user: stepmania | ||
|
||
## ICONS | ||
|
||
- name: Add Stepmania icon to desktop | ||
copy: | ||
src: files/stepmania.desktop | ||
dest: /home/stepmania/Desktop/stepmania.desktop | ||
mode: 0755 | ||
owner: stepmania | ||
group: stepmania | ||
|
||
- name: Add link to Songs to Desktop | ||
file: | ||
src: /home/stepmania/.stepmania-5.0/Songs | ||
dest: /home/stepmania/Desktop/Songs | ||
state: link |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
- name: Install utility packages | ||
apt: | ||
package: sudo,chromium,vim,htop | ||
|
||
- name: Make sure user stepmania is in sudo group | ||
user: | ||
name: stepmania | ||
groups: sudo | ||
append: yes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
- hosts: all | ||
become: true | ||
roles: | ||
- lightdm | ||
- piuio | ||
- stepmania | ||
- utils |