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

refactor: Apply suggestions

parent f98acf10
No related branches found
No related tags found
No related merge requests found
Pipeline #3726 passed with warnings
Showing
with 100 additions and 1435 deletions
--- ---
#-----------------------------------------------------------------------------# #-----------------------------------------------------------------------------#
# ansible-yunohost allows to deploy Yunohost using Ansible # # ansible-yunohost allows to deploy Yunohost using Ansible #
# Copyright 2021-2021 Lydra https://www.lydra.fr/ # # Copyright 2021-present Lydra https://www.lydra.fr/ #
# # # #
# this program is free software: you can redistribute it and/or modify # # this program is free software: you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by # # it under the terms of the GNU General Public License as published by #
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
[![GitHub Release Date](https://img.shields.io/github/release-date/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) [![GitHub Repo stars](https://img.shields.io/github/stars/LydraFr/ansible-yunohost?style=social)](https://github.com/LydraFr/ansible-yunohost)
# Collection Ansible - lydra.yunohost Collection Ansible - lydra.yunohost
[🇬🇧 English version](README.md) [🇬🇧 English version](README.md)
...@@ -17,18 +17,22 @@ Comme il s'agit d'une collection indépendante, elle peut être publiée selon s ...@@ -17,18 +17,22 @@ Comme il s'agit d'une collection indépendante, elle peut être publiée selon s
## Prérequis ## Prérequis
------------
Votre serveur doit être basé sur du Debian Buster et Yunohost ne doit pas déjà être installé. Votre serveur doit être basé sur du Debian Buster et Yunohost ne doit pas déjà être installé.
## Contenu de la collection ## Contenu de la collection
### Rôles ### Rôles
- `lydra.yunohost.ynh_setup` : Ce rôle prépare les serveurs à base de Debian-Buster à exécuter Yunohost. Il configure Yunohost avec ses paramètres initiaux et les domaines, utilisateurs et applications de votre choix. - [`lydra.yunohost.ynh_setup`](roles/ynh_setup/README-FR.md) : Ce rôle prépare les serveurs à base de Debian-Buster à exécuter Yunohost. Il configure Yunohost avec ses paramètres initiaux et les domaines, utilisateurs et applications de votre choix.
- `lydra.yunohost.ynh_config` : Ce rôle gère la configuration de différents services de Yunohost (relais SMTP, mises à jour automatiques). - [`lydra.yunohost.ynh_config`](roles/ynh_config/README-FR.md) : Ce rôle gère la configuration de différents services de Yunohost (relais SMTP, mises à jour automatiques).
- `lydra.yunohost.ynh_backup` : Ce rôle gère la configuration des sauvegardes. - [`lydra.yunohost.ynh_backup`](roles/ynh_backup/README-FR.md) : Ce rôle gère la configuration des sauvegardes.
### lydra.yunohost Tags du rôle ### lydra.yunohost Tags du rôle
------------
Ces tags sont applicables suivant les rôles. Ces tags sont applicables suivant les rôles.
|tags|commentaires| |tags|commentaires|
...@@ -44,6 +48,8 @@ Ces tags sont applicables suivant les rôles. ...@@ -44,6 +48,8 @@ Ces tags sont applicables suivant les rôles.
## License ## 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 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. **ansible-yunohost** est maintenu par [Lydra](https://lydra.fr/) et publié sous la licence GPL3.
...@@ -17,18 +17,22 @@ As this is an independent collection, it can be released on its own release cade ...@@ -17,18 +17,22 @@ As this is an independent collection, it can be released on its own release cade
# Prerequisites # Prerequisites
------------
Your server must be Debian-Buster based and Yunohost shouldn't be already installed. Your server must be Debian-Buster based and Yunohost shouldn't be already installed.
## Collection contents ## Collection contents
### Roles ### Roles
- `lydra.yunohost.ynh_setup` : This role prepares servers with Debian-Buster-based to run Yunohost. It sets up Yunohost with its initial settings and domains, users and apps of your choice. - [`lydra.yunohost.ynh_setup`](roles/ynh_setup/README.md): This role prepares servers with Debian-Buster-based to run Yunohost. It sets up Yunohost with its initial settings and domains, users and apps of your choice.
- `lydra.yunohost.ynh_config` : This role configures various Yunohost services (SMTP relay, auto updates). - [`lydra.yunohost.ynh_config`](roles/ynh_config/README.md): This role configures various Yunohost services (SMTP relay, auto updates).
- `lydra.yunohost.ynh_backup` : This role manages the configuration of backups. - [`lydra.yunohost.ynh_backup`](roles/ynh_backup/README.md): This role manages the configuration of backups.
## lydra.yunohost Role Tags ## lydra.yunohost Role Tags
------------
These tags are applicable to roles. These tags are applicable to roles.
|tags|comment| |tags|comment|
...@@ -44,6 +48,8 @@ These tags are applicable to roles. ...@@ -44,6 +48,8 @@ These tags are applicable to roles.
## License ## 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 Copyright 2021 Lydra](https://www.gnu.org/graphics/gplv3-with-text-136x68.png)](https://choosealicense.com/licenses/gpl-3.0/)
**ansible-yunohost** is maintained by [Lydra](https://lydra.fr/) and released under the GPL3 license. **ansible-yunohost** is maintained by [Lydra](https://lydra.fr/) and released under the GPL3 license.
...@@ -55,7 +55,7 @@ documentation: https://github.com/LydraFr/ansible-yunohost/blob/main/README.md ...@@ -55,7 +55,7 @@ documentation: https://github.com/LydraFr/ansible-yunohost/blob/main/README.md
homepage: https://github.com/LydraFr/ansible-yunohost homepage: https://github.com/LydraFr/ansible-yunohost
# The URL to the collection issue tracker # The URL to the collection issue tracker
issues: http://example.com/issue/tracker issues: https://lab.frogg.it/lydra/yunohost/ansible-yunohost/-/issues
# A list of file glob-like patterns used to filter any files or directories that should not be included in the build # A list of file glob-like patterns used to filter any files or directories that should not be included in the build
# artifact. A pattern is matched from the relative path of the file or directory of the collection directory. This # artifact. A pattern is matched from the relative path of the file or directory of the collection directory. This
......
This diff is collapsed.
[![](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)
# Rôle Ansible : Yunohost Backup # Rôle Ansible : Yunohost Backup
[🇬🇧 English version](README.md) [🇬🇧 English version](README.md)
...@@ -16,14 +6,20 @@ Sauvegardez [Yunohost](https://yunohost.org/#/) avec Ansible ! ...@@ -16,14 +6,20 @@ Sauvegardez [Yunohost](https://yunohost.org/#/) avec Ansible !
## Prérequis ## Prérequis
------------
Yunohost doit déjà être installé sur votre serveur. Yunohost doit déjà être installé sur votre serveur.
## Variables du rôle ## Variables du rôle
------------
Les variables par défaut sont disponibles dans `default/main.yml` cependant il est possible de les surcharger selon vos besoins en ... Les variables par défaut sont disponibles dans `default/main.yml` cependant il est possible de les surcharger selon vos besoins en ...
### Gestion des sauvegardes ### Gestion des sauvegardes
------------
```yml ```yml
ynh_backup: ynh_backup:
scheduled: True scheduled: True
...@@ -50,10 +46,14 @@ La tâche backup va permettre de sauvegarder les applications Yunohost ainsi que ...@@ -50,10 +46,14 @@ La tâche backup va permettre de sauvegarder les applications Yunohost ainsi que
## Dépendances ## Dépendances
------------
Aucune. Aucune.
## Exemple de Playbook ## Exemple de Playbook
------------
```yml ```yml
--- ---
- name: Configure Yunohost backups - name: Configure Yunohost backups
...@@ -67,6 +67,8 @@ Aucune. ...@@ -67,6 +67,8 @@ Aucune.
## License ## 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 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. **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 Role: Yunohost # Ansible Role: Yunohost
[🇫🇷 French version](README-FR.md) [🇫🇷 French version](README-FR.md)
...@@ -16,14 +6,20 @@ Deploy [Yunohost](https://yunohost.org/#/) with Ansible! ...@@ -16,14 +6,20 @@ Deploy [Yunohost](https://yunohost.org/#/) with Ansible!
## Requirements ## Requirements
------------
Yunohost needs to be installed on your server. Yunohost needs to be installed on your server.
## Role Variables ## Role Variables
------------
Default variables are available in `default/main.yml` however it is necessary to override them according to your needs for ... Default variables are available in `default/main.yml` however it is necessary to override them according to your needs for ...
### Backups management ### Backups management
------------
```yml ```yml
ynh_backup: ynh_backup:
scheduled: True scheduled: True
...@@ -50,10 +46,14 @@ The backup task will allow to backup Yunohost applications and their data by set ...@@ -50,10 +46,14 @@ The backup task will allow to backup Yunohost applications and their data by set
## Dependencies ## Dependencies
------------
None. None.
## Example Playbook ## Example Playbook
------------
```yml ```yml
--- ---
- name: Configure Yunohost backups - name: Configure Yunohost backups
...@@ -67,6 +67,8 @@ None. ...@@ -67,6 +67,8 @@ None.
## License ## 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 Copyright 2021 Lydra](https://www.gnu.org/graphics/gplv3-with-text-136x68.png)](https://choosealicense.com/licenses/gpl-3.0/)
**ansible-yunohost** is maintained by [Lydra](https://lydra.fr/) and released under the GPL3 license. **ansible-yunohost** is maintained by [Lydra](https://lydra.fr/) and released under the GPL3 license.
--- ---
#-----------------------------------------------------------------------------# #-----------------------------------------------------------------------------#
# ansible-yunohost allows to deploy Yunohost using Ansible # # ansible-yunohost allows to deploy Yunohost using Ansible #
# Copyright 2021-2021 Lydra https://www.lydra.fr/ # # Copyright 2021-present Lydra https://www.lydra.fr/ #
# # # #
# this program is free software: you can redistribute it and/or modify # # this program is free software: you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by # # it under the terms of the GNU General Public License as published by #
......
...@@ -7,9 +7,9 @@ galaxy_info: ...@@ -7,9 +7,9 @@ galaxy_info:
min_ansible_version: 2.10 min_ansible_version: 2.10
github_branch: main github_branch: main
platforms: platforms:
- name: Debian - name: Debian
versions: versions:
- buster - buster
galaxy_tags: galaxy_tags:
- yunohost - yunohost
- cloud - cloud
......
--- ---
#-----------------------------------------------------------------------------# #-----------------------------------------------------------------------------#
# ansible-yunohost allows to deploy Yunohost using Ansible # # ansible-yunohost allows to deploy Yunohost using Ansible #
# Copyright 2021-2021 Lydra https://www.lydra.fr/ # # Copyright 2021-present Lydra https://www.lydra.fr/ #
# # # #
# this program is free software: you can redistribute it and/or modify # # this program is free software: you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by # # it under the terms of the GNU General Public License as published by #
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
state: directory state: directory
mode: '0750' mode: '0750'
tags: tags:
- "backup" - backup
- name: Create backup script - name: Create backup script
ansible.builtin.template: ansible.builtin.template:
...@@ -34,8 +34,8 @@ ...@@ -34,8 +34,8 @@
group: root group: root
mode: '0740' mode: '0740'
tags: tags:
- "backup" - backup
- "cron" - cron
- name: Create cron task to perform YNH backup - name: Create cron task to perform YNH backup
ansible.builtin.cron: ansible.builtin.cron:
...@@ -48,5 +48,5 @@ ...@@ -48,5 +48,5 @@
job: "{{ ynh_backup.dest_script | default('/usr/local/bin/') }}ynh_backup.sh" job: "{{ ynh_backup.dest_script | default('/usr/local/bin/') }}ynh_backup.sh"
cron_file: ynh_backup_cron cron_file: ynh_backup_cron
tags: tags:
- "backup" - backup
- "cron" - cron
--- ---
#-----------------------------------------------------------------------------# #-----------------------------------------------------------------------------#
# ansible-yunohost allows to deploy Yunohost using Ansible # # ansible-yunohost allows to deploy Yunohost using Ansible #
# Copyright 2021-2021 Lydra https://www.lydra.fr/ # # Copyright 2021-present Lydra https://www.lydra.fr/ #
# # # #
# this program is free software: you can redistribute it and/or modify # # this program is free software: you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by # # it under the terms of the GNU General Public License as published by #
...@@ -22,4 +22,4 @@ ...@@ -22,4 +22,4 @@
ansible.builtin.include_tasks: backup.yml ansible.builtin.include_tasks: backup.yml
when: ynh_backup.scheduled when: ynh_backup.scheduled
tags: tags:
- "backup" - backup
#!/bin/sh #!/bin/sh
{% if ynh_backup.system and ynh_backup.apps and ynh_backup.directory %} yunohost backup create {% if ynh_backup.system %}--system{% endif %}{% if ynh_backup.apps %} --apps{% endif %}{% if ynh_backup.directory %} --output-directory {{ ynh_backup.directory }}/backup_$(date +%Y%m%d_%H%M) {% endif %}
yunohost backup create --output-directory {{ ynh_backup.directory }}/backup_$(date +%Y%m%d_%H%M)
{% elif ynh_backup.system and ynh_backup.apps %}
yunohost backup create
{% elif ynh_backup.system %}
yunohost backup create --system
{% elif ynh_backup.apps %}
yunohost backup create --apps
{% endif %}
{% if ynh_backup.system is false and ynh_backup.apps is false %} {% if ynh_backup.system is false and ynh_backup.apps is false %}
echo "Read the readme to know more about ynh_backup.system and ynh_backup.apps" echo "Read the readme to know more about vars ynh_backup.system and ynh_backup.apps"
echo "TO BE DEFINED"
exit 1 exit 1
{% endif %} {% endif %}
This diff is collapsed.
[![](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)
# Rôle Ansible : Yunohost Configuration # Rôle Ansible : Yunohost Configuration
[🇬🇧 English version](README.md) [🇬🇧 English version](README.md)
...@@ -20,10 +10,14 @@ Yunohost doit déjà être installé sur votre serveur. ...@@ -20,10 +10,14 @@ Yunohost doit déjà être installé sur votre serveur.
## Variables du rôle ## Variables du rôle
------------
Les variables par défaut sont disponibles dans `default/main.yml` cependant il est possible de les surcharger selon vos besoins. Les variables par défaut sont disponibles dans `default/main.yml` cependant il est possible de les surcharger selon vos besoins.
### Configuration d'un relais SMTP ### Configuration d'un relais SMTP
------------
```yml ```yml
# paramètres personnalisés du relais SMTP # paramètres personnalisés du relais SMTP
ynh_smtp_relay: ynh_smtp_relay:
...@@ -38,6 +32,8 @@ Pour faire cela, créez la variable `ynh_smtp_relay` et mettez vos propres valeu ...@@ -38,6 +32,8 @@ Pour faire cela, créez la variable `ynh_smtp_relay` et mettez vos propres valeu
### Concernant les mises à jour ### Concernant les mises à jour
------------
```yml ```yml
# Autoupdate Yunohost and its apps # Autoupdate Yunohost and its apps
ynh_autoupdate: ynh_autoupdate:
...@@ -62,10 +58,14 @@ Pour en savoir plus sur le fonctionnement des mises à jour dans Yunohost vous p ...@@ -62,10 +58,14 @@ Pour en savoir plus sur le fonctionnement des mises à jour dans Yunohost vous p
## Dépendances ## Dépendances
------------
Aucune. Aucune.
## Exemple de Playbook ## Exemple de Playbook
------------
```yml ```yml
--- ---
- name: Configure Yunohost on Debian Server - name: Configure Yunohost on Debian Server
...@@ -79,6 +79,8 @@ Aucune. ...@@ -79,6 +79,8 @@ Aucune.
## License ## 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 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. **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 Role: Yunohost # Ansible Role: Yunohost
[🇫🇷 French version](README-FR.md) [🇫🇷 French version](README-FR.md)
...@@ -16,14 +6,20 @@ Deploy [Yunohost](https://yunohost.org/#/) with Ansible! ...@@ -16,14 +6,20 @@ Deploy [Yunohost](https://yunohost.org/#/) with Ansible!
## Requirements ## Requirements
------------
None. None.
## Role Variables ## 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. 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.
### SMTP relay configuration ### SMTP relay configuration
------------
```yml ```yml
# SMTP custom settings # SMTP custom settings
ynh_smtp_relay: ynh_smtp_relay:
...@@ -38,6 +34,8 @@ In order to do so, create the `ynh_smtp_relay` variable and provide your own val ...@@ -38,6 +34,8 @@ In order to do so, create the `ynh_smtp_relay` variable and provide your own val
### About the updates ### About the updates
------------
```yml ```yml
# Autoupdate Yunohost and its apps # Autoupdate Yunohost and its apps
ynh_autoupdate: ynh_autoupdate:
...@@ -62,10 +60,14 @@ To learn more about how updates work in Yunohost you can go [here](https://yunoh ...@@ -62,10 +60,14 @@ To learn more about how updates work in Yunohost you can go [here](https://yunoh
## Dependencies ## Dependencies
------------
None. None.
## Example Playbook ## Example Playbook
------------
```yml ```yml
--- ---
- name: Configure Yunohost on Debian Server - name: Configure Yunohost on Debian Server
...@@ -79,6 +81,8 @@ None. ...@@ -79,6 +81,8 @@ None.
## License ## 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 Copyright 2021 Lydra](https://www.gnu.org/graphics/gplv3-with-text-136x68.png)](https://choosealicense.com/licenses/gpl-3.0/)
**ansible-yunohost** is maintained by [Lydra](https://lydra.fr/) and released under the GPL3 license. **ansible-yunohost** is maintained by [Lydra](https://lydra.fr/) and released under the GPL3 license.
--- ---
#-----------------------------------------------------------------------------# #-----------------------------------------------------------------------------#
# ansible-yunohost allows to deploy Yunohost using Ansible # # ansible-yunohost allows to deploy Yunohost using Ansible #
# Copyright 2021-2021 Lydra https://www.lydra.fr/ # # Copyright 2021-present Lydra https://www.lydra.fr/ #
# # # #
# this program is free software: you can redistribute it and/or modify # # this program is free software: you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by # # it under the terms of the GNU General Public License as published by #
......
...@@ -7,9 +7,9 @@ galaxy_info: ...@@ -7,9 +7,9 @@ galaxy_info:
min_ansible_version: 2.10 min_ansible_version: 2.10
github_branch: main github_branch: main
platforms: platforms:
- name: Debian - name: Debian
versions: versions:
- buster - buster
galaxy_tags: galaxy_tags:
- yunohost - yunohost
- cloud - cloud
......
--- ---
#-----------------------------------------------------------------------------# #-----------------------------------------------------------------------------#
# ansible-yunohost allows to deploy Yunohost using Ansible # # ansible-yunohost allows to deploy Yunohost using Ansible #
# Copyright 2021-2021 Lydra https://www.lydra.fr/ # # Copyright 2021-present Lydra https://www.lydra.fr/ #
# # # #
# this program is free software: you can redistribute it and/or modify # # this program is free software: you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by # # it under the terms of the GNU General Public License as published by #
...@@ -26,8 +26,8 @@ ...@@ -26,8 +26,8 @@
group: root group: root
mode: '0740' mode: '0740'
tags: tags:
- "update" - update
- "cron" - cron
- name: Creates cron task under /etc/cron.d to auto-update Yunohost - name: Creates cron task under /etc/cron.d to auto-update Yunohost
ansible.builtin.cron: ansible.builtin.cron:
...@@ -38,5 +38,5 @@ ...@@ -38,5 +38,5 @@
job: "{{ ynh_autoupdate.dest_script | default('/usr/local/bin/') }}ynh_autoupdate.sh" job: "{{ ynh_autoupdate.dest_script | default('/usr/local/bin/') }}ynh_autoupdate.sh"
cron_file: ynh_autoupdate_cron cron_file: ynh_autoupdate_cron
tags: tags:
- "update" - update
- "cron" - cron
--- ---
#-----------------------------------------------------------------------------# #-----------------------------------------------------------------------------#
# ansible-yunohost allows to deploy Yunohost using Ansible # # ansible-yunohost allows to deploy Yunohost using Ansible #
# Copyright 2021-2021 Lydra https://www.lydra.fr/ # # Copyright 2021-present Lydra https://www.lydra.fr/ #
# # # #
# this program is free software: you can redistribute it and/or modify # # this program is free software: you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by # # it under the terms of the GNU General Public License as published by #
...@@ -23,10 +23,10 @@ ...@@ -23,10 +23,10 @@
loop: "{{ ynh_smtp_relay | dict2items }}" loop: "{{ ynh_smtp_relay | dict2items }}"
when: item.value when: item.value
tags: tags:
- "smtp" - smtp
- name: Configures Yunohost autoupdate - name: Configures Yunohost autoupdate
ansible.builtin.include_tasks: autoupdate.yml ansible.builtin.include_tasks: autoupdate.yml
when: ynh_autoupdate.scheduled when: ynh_autoupdate.scheduled
tags: tags:
- "update" - update
--- ---
#-----------------------------------------------------------------------------# #-----------------------------------------------------------------------------#
# ansible-yunohost allows to deploy Yunohost using Ansible # # ansible-yunohost allows to deploy Yunohost using Ansible #
# Copyright 2021-2021 Lydra https://www.lydra.fr/ # # Copyright 2021-present Lydra https://www.lydra.fr/ #
# # # #
# this program is free software: you can redistribute it and/or modify # # this program is free software: you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by # # it under the terms of the GNU General Public License as published by #
...@@ -24,11 +24,11 @@ ...@@ -24,11 +24,11 @@
register: _ynh_smtp_current_values register: _ynh_smtp_current_values
changed_when: False changed_when: False
tags: tags:
- "smtp" - smtp
- name: Set new SMTP settings - name: Set new SMTP settings
ansible.builtin.command: ansible.builtin.command:
"yunohost settings set smtp.relay.{{ item.key }} -v {{ item.value }}" "yunohost settings set smtp.relay.{{ item.key }} -v {{ item.value }}"
when: _ynh_smtp_current_values.stdout != item.value when: _ynh_smtp_current_values.stdout != item.value
tags: tags:
- "smtp" - smtp
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