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 df59eb85 authored by Arthur BOUDREAULT's avatar Arthur BOUDREAULT
Browse files

refactor: restructuring role into collection #3

parent 4ca61780
No related branches found
No related tags found
No related merge requests found
Pipeline #3691 passed with warnings
[![](https://img.shields.io/liberapay/receives/cchaudier.svg?logo=liberapay)](https://liberapay.com/cchaudier/donate)
[![](https://lab.frogg.it/lydra/yunohost/ansible-yunohost/badges/main/pipeline.svg)](https://lab.frogg.it/lydra/yunohost/ansible-yunohost/-/pipelines)
[![License: GPL v3](https://img.shields.io/badge/License-GPL%20v3-blue.svg)](http://www.gnu.org/licenses/gpl-3.0)
[![Ansible Role](https://img.shields.io/ansible/role/56544)](https://galaxy.ansible.com/lydra/yunohost)
[![Ansible Quality Score](https://img.shields.io/ansible/quality/56544)](https://galaxy.ansible.com/lydra/yunohost)
[![Ansible Role](https://img.shields.io/ansible/role/d/56544)](https://galaxy.ansible.com/lydra/yunohost)
[![GitHub last commit](https://img.shields.io/github/last-commit/LydraFr/ansible-yunohost)](https://github.com/LydraFr/ansible-yunohost)
[![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)
# Collection Ansible - lydra.yunohost
[🇬🇧 English version](README.md)
Cette collection vise à installer, configurer et sauvegarder [Yunohost](https://yunohost.org/#/).
Comme il s'agit d'une collection indépendante, elle peut être publiée selon sa propre cadence de publication.
## Prérequis
Votre serveur doit être basé sur du Debian Buster.
## Contenu de la collection
### Rôles
- `lydra.yunohost.ynh_setup` : Ce rôle prépare les serveurs à base de Debian-Buster à exécuter Yunohost.
- `lydra.yunohost.ynh_config` : Ce rôle gère la configuration et le démarrage des différents services de Yunohost (relais SMTP, mises à jour automatiques).
- `lydra.yunohost.ynh_backup` : Ce rôle gère la configuration des sauvegardes.
## License
[![ansible-yunohost Copyright 2021 Lydra](https://www.gnu.org/graphics/gplv3-with-text-136x68.png)](https://choosealicense.com/licenses/gpl-3.0/)
**ansible-yunohost** est maintenu par [Lydra](https://lydra.fr/) et publié sous la licence GPL3.
[![](https://img.shields.io/liberapay/receives/cchaudier.svg?logo=liberapay)](https://liberapay.com/cchaudier/donate)
[![](https://lab.frogg.it/lydra/yunohost/ansible-yunohost/badges/main/pipeline.svg)](https://lab.frogg.it/lydra/yunohost/ansible-yunohost/-/pipelines)
[![License: GPL v3](https://img.shields.io/badge/License-GPL%20v3-blue.svg)](http://www.gnu.org/licenses/gpl-3.0)
[![Ansible Role](https://img.shields.io/ansible/role/56544)](https://galaxy.ansible.com/lydra/yunohost)
[![Ansible Quality Score](https://img.shields.io/ansible/quality/56544)](https://galaxy.ansible.com/lydra/yunohost)
[![Ansible Role](https://img.shields.io/ansible/role/d/56544)](https://galaxy.ansible.com/lydra/yunohost)
[![GitHub last commit](https://img.shields.io/github/last-commit/LydraFr/ansible-yunohost)](https://github.com/LydraFr/ansible-yunohost)
[![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 Collection - lydra.yunohost
This collection aims at installing, configuring and backing up Yunohost.
[🇫🇷 French version](README-FR.md)
This collection aims at installing, configuring and backing up [Yunohost](https://yunohost.org/#/).
As this is an independent collection, it can be released on its own release cadence.
# Prerequisites
Your server must be Debian-Buster based.
## Collection contents
### Roles
- `lydra.yunohost.ynh_setup` : This role prepares servers with Debian-Buster-based to run Yunohost.
- `lydra.yunohost.ynh_config` : This role manages configuring and starting various Yunohost services.
- `lydra.yunohost.ynh_config` : This role manages configuring and starting various Yunohost services (SMTP relay, auto updates).
- `lydra.yunohost.ynh_backup` : This role manages configuring of backups.
## License
[![ansible-yunohost Copyright 2021 Lydra](https://www.gnu.org/graphics/gplv3-with-text-136x68.png)](https://choosealicense.com/licenses/gpl-3.0/)
......
......@@ -46,13 +46,13 @@ tags:
dependencies: {}
# The URL of the originating SCM repository
repository: http://example.com/repository
repository: https://github.com/LydraFr/ansible-yunohost
# The URL to any online docs
documentation: http://docs.example.com
documentation: https://github.com/LydraFr/ansible-yunohost/blob/main/README.md
# The URL to the homepage of the collection/project
homepage: http://example.com
homepage: https://github.com/LydraFr/ansible-yunohost
# The URL to the collection issue tracker
issues: http://example.com/issue/tracker
......
......@@ -99,6 +99,7 @@ ynh_apps:
- `link` correspond au nom de l'application Yunohost qu'on veut installer.
#### Concernant les arguments
- `domain` est obligatoire. Il faut choisir un des domaines de son instance Yunohost.
- `path` est obligatoire. 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.
......@@ -106,7 +107,8 @@ ynh_apps:
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).
#### Concernant la post-installation
Il est possible de compléter l'installation des applications par l'ajout de templates jinja de configuration ou de scripts que vous aurez écrit de votre côté.
Il est possible de compléter l'installation des applications par l'ajout de templates jinja de configuration ou de scripts que vous aurez écrit de votre côté.
Pour activer cette fonctionnalité, définissez la variable `post_install` qui correspond à la liste des fichiers de post-installation de votre application.
Cette tâche utilisant le module template, vous pouvez tout à fait utiliser vos propres variables et les appeler dans vos fichiers de template. Pour en savoir sur ce module, cliquez [ici](https://docs.ansible.com/ansible/latest/collections/ansible/builtin/template_module.html).
......@@ -129,6 +131,8 @@ Aucune.
- name: Install Yunohost on Debian Server
hosts: all
become: True
collections:
- lydra.yunohost
pre_tasks:
- name: Update all packages and index
ansible.builtin.apt:
......@@ -136,7 +140,7 @@ Aucune.
update_cache: yes
roles:
- lydra.yunohost
- ynh_setup
```
## License
......
......@@ -104,7 +104,7 @@ ynh_apps:
- `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).
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).
#### About the post-installation
......@@ -131,6 +131,8 @@ None.
- name: Install Yunohost on Debian Server
hosts: all
become: True
collections:
- lydra.yunohost
pre_tasks:
- name: Update all packages and index
ansible.builtin.apt:
......@@ -138,7 +140,7 @@ None.
update_cache: yes
roles:
- ansible-yunohost
- ynh_setup
```
## License
......
......@@ -60,11 +60,6 @@
ansible.builtin.command: yunohost domain cert-install
changed_when: False
- name: Configure SMTP relay
ansible.builtin.include_tasks: smtp_relay.yml
loop: "{{ ynh_smtp_relay | dict2items }}"
when: item.value
- name: Add Yunohost users
ansible.builtin.include_tasks: users.yml
when: ynh_users
......@@ -72,7 +67,3 @@
- name: Install Yunohost apps
ansible.builtin.include_tasks: apps.yml
when: ynh_apps
- name: Configures Yunohost autoupdate
ansible.builtin.include_tasks: autoupdate.yml
when: ynh_autoupdate.scheduled
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