Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/maxhoesel-ansible/ansible-collection-pterodactyl

A collection to manage Pterodactyl Panel and Daemon hosts
https://github.com/maxhoesel-ansible/ansible-collection-pterodactyl

Last synced: 6 days ago
JSON representation

A collection to manage Pterodactyl Panel and Daemon hosts

Awesome Lists containing this project

README

        

# maxhoesel.pterodactyl

![Release](https://img.shields.io/github/v/release/maxhoesel-ansible/ansible-collection-pterodactyl?style=flat-square)
![Build Status](https://img.shields.io/circleci/build/github/maxhoesel-ansible/ansible-collection-pterodactyl/main?style=flat-square)
![License](https://img.shields.io/github/license/maxhoesel-ansible/ansible-collection-pterodactyl?style=flat-square)

An Ansible collection to manage Pterodactyl Panel and Wings servers. This collection targets the 1.X
series of Pterodactyl software. There is no support for older versions (0.7 and before).

The collection currently contains roles for installing both the panel and wings on a variety of distributions.
Modules for accessing the Pterodactyl API are planned for the future, once a Python API wrapper
for v1.0 becomes available.

## Installation

### Dependencies

- A recent version of ansible. We test against the current and the previous major release
- Python 3.7 or newer on remote hosts and the controller

### Install via ansible-galaxy

Install this role via ansible-galaxy:

`ansible-galaxy collection install maxhoesel.pterodactyl`

You can also install the most recent version of this collection by referencing this repository.

`ansible-galaxy collection install git+https://github.com/maxhoesel-ansible/ansible-collection-pterodactyl`

## Usage

Currently, two roles are available: `pterodactyl_panel` and `pterodactyl_wings`.
These roles manage installation of the respective component. See their docs ([panel](https://github.com/maxhoesel-ansible/ansible-collection-pterodactyl/tree/main/roles/pterodactyl_panel), [wings](https://github.com/maxhoesel-ansible/ansible-collection-pterodactyl/tree/main/roles/pterodactyl_wings)) for more details.

Let's say you want to deploy a pterodactyl installation with a panel and a few nodes.
In this case, your inventory probably looks a little like this:

```yaml
all:
children:
panel:
panel.my.domain:
nodes:
node1.my.domain:
node2.my.domain:
node3.my.domain:
#...
```

### Installing the Panel

First, let's install the panel using the `pterodactyl_panel` role. There's a few things do to first though:

- Make sure that your host meets the requirements of `pterodactyl_panel` (see the roles [README](https://github.com/maxhoesel-ansible/ansible-collection-pterodactyl/tree/main/roles/pterodactyl_panel) for details.)
- Create and prepare a MySQL/MariaDB database + user for the panel (you can use [geerlingguy's role](https://github.com/geerlingguy/ansible-role-mysql) for this).
- Create and save a SSL certificate to the remote host. This will be used as the HTTPS certificate by Apache.
You can use Let's Encrypt or create your own self-signed cert (for internal use, make sure that all your hosts trust that cert!)
- (Optional) Configure a SMTP server to accept outgoing mail coming from your panel. This isn't required for internal/testing setups, but still recommended

Finally, we need to generate a valid App Key and HashIDs salt. These cryptographic values are required to setup the panel and should
to be saved in a secure location, such as Ansible Vault. You can generate them on your machine by running these commands:

- App Key: `echo "base64:$(openssl rand -base64 32)"`
- HashIDs Salt: `tr -dc A-Za-z0-9