Pour tout problème contactez-nous par mail : support@froggit.fr | La FAQ :grey_question: | Rejoignez-nous sur le Chat :speech_balloon:

Skip to content
Snippets Groups Projects
Commit c0aecc52 authored by Arthur BOUDREAULT's avatar Arthur BOUDREAULT
Browse files

refactor: Better understanding at how the role interacts with ynh

parent bd22f8c8
No related branches found
No related tags found
No related merge requests found
This commit is part of merge request !8. Comments created here will be created in the context of that merge request.
# ansible-yunohost
# Ansible Role: Yunohost
[🇬🇧 English version](README.md)
Deployez Yunohost avec Ansible !
Deployez [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
```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.
Le `ynh_install_script_url` récupère le script officiel pour l'installation des packages Yunohost. 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.
```yml
# Liste des domaines gérés par Yunohost.
ynh_main_domain: domain.tld
ynh_extra_domains:
- forum.domain.tld
- wiki.domain.tld
ynh_ignore_dyndns_server: False
```
`ynh_main_domain` correspond au domaine principal qui permettra 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)).
# The list of Yunohost users.
Les sous-domaines `ynh_extra_domains` sont optionnels et 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)).
```yml
# Liste des utilisateurs Yunohost.
ynh_users:
- name: user1
pass: MYINSECUREPWD_PLZ_OVERRIDE_THIS
firstname: Jane
lastname: Doe
mail_domain: domain.tld
```
# The list of Yunohost apps.
Les utilisateurs sont créés à partir de la variable `ynh_users`. 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).
```yml
# Liste des applications Yunohost.
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.
- label: WikiJS
link: wikijs
args:
domain: wiki.domain.tld
path: /
admin: user1
......@@ -50,11 +66,15 @@ ynh_apps:
admin: user1
is_public: yes
```
Les applications sont installées à partir de la variable `ynh_apps`. La variable `label` permet de donner un nom personnalisé à l'application sur l'interface utilisateur. `link` correspond au nom de l'application Yunohost qu'on souhaite installer. Concernant les arguments, `path` et `domain` sont indispensables. 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.
## Dépendances
Aucune.
## Exemple de Playbook
```yml
---
- name: Install Yunohost on Debian Server
......
# 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
```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.
```yml
# The list of Yunohost domains.
ynh_main_domain: domain.tld
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)).
```yml
# The list of Yunohost users.
ynh_users:
- name: user1
......@@ -32,12 +43,15 @@ ynh_users:
firstname: Jane
lastname: Doe
mail_domain: domain.tld
```
Yunohost users are created from `ynh_users` variable. 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).
```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.
- label: WikiJS
link: wikijs
args:
domain: wiki.domain.tld
path: /
admin: user1
......@@ -51,11 +65,14 @@ ynh_apps:
is_public: yes
```
Applications are installed from the `ynh_apps` variable. The `label` variable is used to give a custom name to the application on the user interface. `link` is the name of the Yunohost application we want to install. Regarding the arguments, `path` and `domain` are essential. For the other arguments, you have to refer to the `manifest.json` available in the repository of the Yunohost application you are installing.
## Dependencies
None.
## Example Playbook
```yml
---
- name: Install Yunohost on Debian Server
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment