refactor: Better understanding at how the role interacts with ynh
This commit is contained in:
parent
d178b064e1
commit
b2256f5e5f
3 changed files with 108 additions and 38 deletions
74
README-FR.md
74
README-FR.md
|
@ -8,63 +8,99 @@
|
|||
[![GitHub Release Date](https://img.shields.io/github/release-date/LydraFr/ansible-yunohost)](https://github.com/LydraFr/ansible-yunohost)
|
||||
[![GitHub Repo stars](https://img.shields.io/github/stars/LydraFr/ansible-yunohost?style=social)](https://github.com/LydraFr/ansible-yunohost)
|
||||
|
||||
# ansible-yunohost
|
||||
# Rôle Ansible : Yunohost
|
||||
|
||||
[🇬🇧 English version](README.md)
|
||||
|
||||
Deployez Yunohost avec Ansible !
|
||||
Déployez [Yunohost](https://yunohost.org/#/) avec Ansible !
|
||||
|
||||
## Prérequis
|
||||
|
||||
Aucun.
|
||||
|
||||
## Role Variables
|
||||
## Variables du rôle
|
||||
|
||||
Les variables par défaut sont disponibles dans `default/main.yml` cependant il est nécessaire de les surcharger selon vos besoins en termes de domaines, d'utilisateurs et d'applications sur Yunohost.
|
||||
|
||||
## Exemple de Variables
|
||||
### Installation de Yunohost
|
||||
|
||||
```yml
|
||||
---
|
||||
# Debian 10 script only.
|
||||
# Script pour Debian 10 uniquement.
|
||||
ynh_install_script_url: https://install.yunohost.org
|
||||
|
||||
ynh_admin_password: MYINSECUREPWD_PLZ_OVERRIDE_THIS
|
||||
```
|
||||
|
||||
# The list of domains.
|
||||
-`ynh_install_script_url` est le script d'installation des packages Yunohost, par défaut c'est le script officiel. Yunohost ne s'installe que sur Debian 10.
|
||||
- `ynh_admin_password` est le mot de passe permettant d'accéder à l’interface d’administration du serveur.
|
||||
|
||||
### Gestion des domaines
|
||||
|
||||
```yml
|
||||
# Liste des domaines gérés par Yunohost.
|
||||
ynh_main_domain: domain.tld
|
||||
ynh_extra_domains:
|
||||
ynh_extra_domains:
|
||||
- forum.domain.tld
|
||||
- wiki.domain.tld
|
||||
ynh_ignore_dyndns_server: False
|
||||
```
|
||||
|
||||
# The list of Yunohost users.
|
||||
ynh_users:
|
||||
- `ynh_main_domain` correspond au domaine principal qui permet l’accès au serveur ainsi qu’au portail d’authentification des utilisateurs. On peut se contenter d'un nom de domaine qui nous appartient ou en utiliser un en .nohost.me / .noho.st / .ynh.fr (plus d'infos [ici](https://yunohost.org/fr/install/hardware:vps_debian)).
|
||||
- `ynh_extra_domains` sont des sous-domaines optionnels. Ils permettent d'installer une application par sous-domaine (plus d'infos [ici](https://yunohost.org/fr/dns_subdomains)).
|
||||
- `ynh_ignore_dyndns_server` permet d'enregistrer les domaines avec un service de DNS dynamique (plus d'infos [ici](https://yunohost.org/fr/dns_dynamicip)).
|
||||
|
||||
### Gestion des utilisateurs
|
||||
|
||||
```yml
|
||||
# Liste des utilisateurs Yunohost.
|
||||
ynh_users:
|
||||
- name: user1
|
||||
pass: MYINSECUREPWD_PLZ_OVERRIDE_THIS
|
||||
firstname: Jane
|
||||
lastname: Doe
|
||||
lastname: Doe
|
||||
mail_domain: domain.tld
|
||||
```
|
||||
|
||||
# The list of Yunohost apps.
|
||||
ynh_apps:
|
||||
- label: WikiJS # Label is important, it's a reference for the Playbook.
|
||||
link: wikijs # It can be the name of an official app or a git repo link.
|
||||
args: # Provide args. Domain and pah are mandatory, for other args read manifest.json of app.
|
||||
- `ynh_users` est la liste des utilisateurs à créer. Chaque champ est obligatoire. Certaines applications Yunohost nécessitent qu'un utilisateur soit administrateur de l'application. Il aura ensuite le droit de gérer l'application depuis l'interface l'administration du serveur. Vous pouvez en apprendre plus sur la gestion des utilisateurs Yunohost [ici](https://yunohost.org/fr/administrate/overview/users).
|
||||
|
||||
### Gestion des applications
|
||||
|
||||
```yml
|
||||
# Liste des applications Yunohost.
|
||||
ynh_apps:
|
||||
- label: WikiJS
|
||||
link: wikijs
|
||||
args:
|
||||
domain: wiki.domain.tld
|
||||
path: /
|
||||
admin: user1
|
||||
admin: user1
|
||||
is_public: no
|
||||
- label: Discourse
|
||||
link: discourse
|
||||
link: discourse
|
||||
args:
|
||||
domain: forum.domain.tld
|
||||
path: /
|
||||
admin: user1
|
||||
admin: user1
|
||||
is_public: yes
|
||||
```
|
||||
|
||||
- `ynh_apps` est la liste des applications à installer.
|
||||
- `label` permet de donner un nom personnalisé à l'application sur l'interface utilisateur.
|
||||
- `link` correspond au nom de l'application Yunohost qu'on veut installer.
|
||||
|
||||
Concernant les arguments :
|
||||
- `domain` est indispensable. Il faut choisir un des domaines de son instance Yunohost.
|
||||
- `path` est indispensable. Il faut choisir une URL pour accéder à son application comme `domain.tld/my_app`. Utilisez juste `/` si l'application doit s'installer sur un sous-domaine.
|
||||
- `is_public` est un argument qu'on retrouve souvent. Paramétré sur `yes`, l'application sera accessible à tout le monde, même sans authentification sur le portail SSO Yunohost. Paramétré sur `no`, l'application ne sera accessible qu'après authentification.
|
||||
|
||||
Pour les autres arguments, il faut se référer au `manifest.json` disponible dans le dépôt de l'application Yunohost qu'on installe. Vous pouvez en apprendre plus sur cette partie [ici](https://yunohost.org/fr/packaging_apps_manifest).
|
||||
|
||||
## Dépendances
|
||||
|
||||
Aucune.
|
||||
|
||||
## Exemple de Playbook
|
||||
|
||||
```yml
|
||||
---
|
||||
- name: Install Yunohost on Debian Server
|
||||
|
|
66
README.md
66
README.md
|
@ -8,64 +8,98 @@
|
|||
[![GitHub Release Date](https://img.shields.io/github/release-date/LydraFr/ansible-yunohost)](https://github.com/LydraFr/ansible-yunohost)
|
||||
[![GitHub Repo stars](https://img.shields.io/github/stars/LydraFr/ansible-yunohost?style=social)](https://github.com/LydraFr/ansible-yunohost)
|
||||
|
||||
# ansible-yunohost
|
||||
# Ansible Role: Yunohost
|
||||
|
||||
[🇫🇷 French version](README-FR.md)
|
||||
|
||||
Deploy Yunohost with Ansible!
|
||||
Deploy [Yunohost](https://yunohost.org/#/) with Ansible!
|
||||
|
||||
## Requirements
|
||||
|
||||
None.
|
||||
|
||||
## Role Variables
|
||||
|
||||
Default variables are available in `default/main.yml` however it is necessary to override them according to your needs for Yunohost domains, users and apps.
|
||||
|
||||
## Example of Variables
|
||||
### Yunohost Installation
|
||||
|
||||
```yml
|
||||
---
|
||||
# Debian 10 script only.
|
||||
ynh_install_script_url: https://install.yunohost.org
|
||||
|
||||
ynh_admin_password: MYINSECUREPWD_PLZ_OVERRIDE_THIS
|
||||
```
|
||||
|
||||
# The list of domains.
|
||||
- `ynh_install_script_url` downloads official Yunohost script for installing Yunohost packages. Yunohost is only available on Debian 10.
|
||||
- `ynh_admin_password` is the password used to access to the server's administration interface.
|
||||
|
||||
### Domain management
|
||||
|
||||
```yml
|
||||
# The list of Yunohost domains.
|
||||
ynh_main_domain: domain.tld
|
||||
ynh_extra_domains:
|
||||
ynh_extra_domains:
|
||||
- forum.domain.tld
|
||||
- wiki.domain.tld
|
||||
ynh_ignore_dyndns_server: False
|
||||
```
|
||||
|
||||
- `ynh_main_domain` is the main domain used by the server's users to access the authentication portal. If you already own a domain name, you probably want to use it here. You can also use a domain in .nohost.me / .noho.st / .ynh.fr (more info [here](https://yunohost.org/en/install/hardware:vps_debian)).
|
||||
- `ynh_extra_domains` are optional and allow you to install one app per subdomain (more info [here](https://yunohost.org/en/administrate/specific_use_cases/domains/dns_subdomains)).
|
||||
- `ynh_ignore_dyndns_server` allow to register domains with a Dynamic DNS service (more info [here](https://yunohost.org/en/dns_dynamicip)).
|
||||
|
||||
### User management
|
||||
|
||||
```yml
|
||||
# The list of Yunohost users.
|
||||
ynh_users:
|
||||
ynh_users:
|
||||
- name: user1
|
||||
pass: MYINSECUREPWD_PLZ_OVERRIDE_THIS
|
||||
firstname: Jane
|
||||
lastname: Doe
|
||||
mail_domain: domain.tld
|
||||
lastname: Doe
|
||||
mail_domain: domain.tld
|
||||
```
|
||||
- `ynh_users` is the list of users to create. Each field is mandatory. Some Yunohost applications require that a user be the app administrator. He will then have the right to manage the application from the server administration interface. You can learn more about Yunohost user management [here](https://yunohost.org/en/users).
|
||||
|
||||
### App management
|
||||
|
||||
```yml
|
||||
# The list of Yunohost apps.
|
||||
ynh_apps:
|
||||
- label: WikiJS # Label is important, it's a reference for the Playbook.
|
||||
link: wikijs # It can be the name of an official app or a git repo link.
|
||||
args: # Provide args. Domain and pah are mandatory, for other args read manifest.json of app.
|
||||
ynh_apps:
|
||||
- label: WikiJS
|
||||
link: wikijs
|
||||
args:
|
||||
domain: wiki.domain.tld
|
||||
path: /
|
||||
admin: user1
|
||||
admin: user1
|
||||
is_public: no
|
||||
- label: Discourse
|
||||
link: discourse
|
||||
link: discourse
|
||||
args:
|
||||
domain: forum.domain.tld
|
||||
path: /
|
||||
admin: user1
|
||||
admin: user1
|
||||
is_public: yes
|
||||
```
|
||||
|
||||
- `ynh_apps` is the list of applications to install.
|
||||
- `label` allows you to give a custom name to the application on the user interface.
|
||||
- `link` is the name of the Yunohost application to install.
|
||||
|
||||
About the arguments:
|
||||
- `domain` is essential. You have to choose one of the domains of your Yunohost instance.
|
||||
- `path` is required. You have to choose a URL to access your application like `domain.tld/my_app`. Just use `/` if the application is to be installed on a subdomain.
|
||||
- `is_public` argument is a common one. Set to `yes`, the application will be accessible to everyone, even without authentication to the Yunohost SSO portal. Set to `no`, the application will be accessible only after authentication.
|
||||
|
||||
For the other arguments, you have to refer to the `manifest.json` available in the repository of the Yunohost application you install. You can learn more about this part [here](https://yunohost.org/fr/packaging_apps_manifest).
|
||||
|
||||
## Dependencies
|
||||
|
||||
None.
|
||||
|
||||
## Example Playbook
|
||||
|
||||
```yml
|
||||
---
|
||||
- name: Install Yunohost on Debian Server
|
||||
|
|
|
@ -19,8 +19,8 @@ ynh_users: null
|
|||
|
||||
# The list of Yunohost apps.
|
||||
ynh_apps: null
|
||||
# - label: Tiny Tiny RSS # Label is important, it's a reference for the Playbook.
|
||||
# link: ttrss # It can be the name of an official ynh app or a git repo link
|
||||
# args: # Provide args here. Domain and path are mandatory, other args depend on the app (cf manifest.json of app).
|
||||
# - label: Tiny Tiny RSS
|
||||
# link: ttrss
|
||||
# args:
|
||||
# domain: domain.tld
|
||||
# path: /ttrss
|
||||
|
|
Loading…
Reference in a new issue