-
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
0 parents
commit c215156
Showing
8 changed files
with
184 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,67 @@ | ||
Ansible role: DevkitPro | ||
========= | ||
|
||
An Ansible Role that installs Devkitpro and devkit tools on Debian/Ubuntu/Pop_Os!. | ||
|
||
Requirements | ||
------------ | ||
|
||
None. | ||
|
||
Role Variables | ||
-------------- | ||
|
||
Available variables are listed below, along with default values (see defaults/main.yml): | ||
|
||
``` | ||
platforms_enabled: | ||
- gp2x | ||
# - gp32 | ||
# - gba | ||
# - nds | ||
# - 3ds | ||
# - gamecube | ||
# - wii | ||
# - wiiu | ||
# - switch | ||
``` | ||
Depending on the devkit you'd like to install, add or remove lines containing your desired platforms without the suffix "-dev". | ||
|
||
See [on the official doc](https://devkitpro.org/wiki/devkitPro_pacman#Using_Pacman) which platforms are supported. | ||
|
||
|
||
Dependencies | ||
------------ | ||
|
||
None. | ||
|
||
|
||
Example Playbook | ||
---------------- | ||
|
||
``` | ||
- hosts: all | ||
vars_files: | ||
- vars/main.yml | ||
roles: | ||
- { role: dag7dev.devkitpro } | ||
``` | ||
|
||
Inside vars/main.yml: | ||
``` | ||
platforms_enabled: | ||
- gba | ||
- nds | ||
``` | ||
|
||
|
||
License | ||
------- | ||
|
||
MIT / BSD | ||
|
||
|
||
Author Information | ||
------------------ | ||
|
||
This role was created in 2023 by Damiano Gualandri, author of [awesome stuff](github.com/dag7dev). |
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,12 @@ | ||
--- | ||
# defaults file for devkitpro-nds | ||
platforms_enabled: | ||
- gp2x | ||
# - gp32 | ||
# - gba | ||
# - nds | ||
# - 3ds | ||
# - gamecube | ||
# - wii | ||
# - wiiu | ||
# - switch |
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,2 @@ | ||
--- | ||
# handlers file for devkitpro |
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,27 @@ | ||
galaxy_info: | ||
author: dag7 | ||
company: "Dag7 Inc." | ||
description: Devkitpro for Linux. | ||
role_name: devkitpro | ||
license: license (BSD, MIT) | ||
|
||
min_ansible_version: 2.10 | ||
platforms: | ||
- name: Amazon | ||
versions: | ||
- all | ||
- name: Debian | ||
versions: | ||
- all | ||
- name: Ubuntu | ||
versions: | ||
- bionic | ||
- jammy | ||
|
||
|
||
galaxy_tags: | ||
- devkit | ||
- homebrew | ||
- console | ||
|
||
allow_duplicates: true |
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,67 @@ | ||
--- | ||
# tasks file for devkitpro | ||
- name: Install ca-certificates | ||
apt: | ||
update_cache: yes | ||
state: latest | ||
name: | ||
- "ca-certificates" | ||
|
||
- name: Check if pip3 command exists | ||
command: "which pip3" | ||
register: pip3_command_check | ||
ignore_errors: true | ||
|
||
- name: Install pip | ||
apt: | ||
name: | ||
- python3-pip | ||
when: pip3_command_check.rc != 0 | ||
|
||
- name: Install pexpect | ||
pip: | ||
name: pexpect | ||
|
||
- name: Print devkit platforms enabled | ||
ansible.builtin.debug: | ||
msg: Platforms enabled {{ platforms_enabled }} | ||
|
||
- name: Check if dkp-pacman command exists | ||
command: "which dkp-pacman" | ||
register: command_check | ||
ignore_errors: true | ||
|
||
- name: Create /tmp directory | ||
file: | ||
path: /tmp | ||
state: directory | ||
when: command_check.rc != 0 | ||
|
||
- name: Get installation script | ||
get_url: | ||
url: https://apt.devkitpro.org/install-devkitpro-pacman | ||
dest: /tmp/install-devkitpro-pacman | ||
mode: '+x' | ||
when: command_check.rc != 0 | ||
|
||
- name: Install devkitpro-pacman | ||
shell: yes | /tmp/install-devkitpro-pacman | ||
when: command_check.rc != 0 | ||
|
||
- name: Check if dkp-pacman command exists | ||
command: "which dkp-pacman" | ||
register: command_check | ||
ignore_errors: true | ||
|
||
- name: Update dkp-pacman packages | ||
shell: yes | | ||
when: command_check.rc == 0 | ||
|
||
- name: Install specified platform devkit {{ item }} | ||
expect: | ||
command: dkp-pacman -S --noconfirm {{ item }}-dev | ||
responses: | ||
".*default*": "all\r" | ||
".*[Y/n].*": "Y\r" | ||
loop: "{{ platforms_enabled }}" | ||
when: command_check.rc == 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,2 @@ | ||
localhost | ||
|
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,5 @@ | ||
--- | ||
- hosts: localhost | ||
remote_user: root | ||
roles: | ||
- devkitpro |
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,2 @@ | ||
--- | ||
# vars file for devkitpro |