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

feat: adds symlinks management

parent 7da3f715
No related branches found
No related tags found
No related merge requests found
Pipeline #3734 passed with warnings
This commit is part of merge request !24. Comments created here will be created in the context of that merge request.
......@@ -45,6 +45,7 @@ Ces tags sont applicables suivant les rôles.
|smtp|Tâches liées aux paramètres de relais smtp de Yunohost.|
|backup|Tâches liées aux sauvegardes de Yunohost.|
|pkg|Tâches d'installation de paquets.|
|linux|Tâches liées à l'OS Linux.|
## License
......
......@@ -45,6 +45,7 @@ These tags are applicable to roles.
|smtp|Tasks related to Yunohost smtp relay settings.|
|backup|Tasks related to Yunohost backups.|
|pkg|Tasks that install packages.|
|linux|Tasks related to Linux OS.|
## License
......
......@@ -19,11 +19,20 @@ Les variables par défaut sont disponibles dans `default/main.yml` cependant il
ynh_install_script_url: https://install.yunohost.org
ynh_admin_password: MYINSECUREPWD_PLZ_OVERRIDE_THIS
ynh_symlink:
enabled: True
appdata_dir: "/data/var/"
conf_dir: "/data/etc/"
```
- `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.
- `ynh_symlink.enabled`: active les liens symboliques. Mettez la valeur à `True`.
- `ynh_symlink.appdata_dir`: Il s'agit du répertoire où stocker votre lien symbolique vers les applications Yunohost.
- `ynh_symlink.conf_dir`: Il s'agit du répertoire où stocker votre lien symbolique vers les fichiers de configuration Yunohost.
### Gestion des domaines
```yml
......
......@@ -24,6 +24,10 @@ ynh_admin_password: MYINSECUREPWD_PLZ_OVERRIDE_THIS
- `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.
- `ynh_symlink.enabled`: enables symbolic links. Set the value to `True`.
- `ynh_symlink.appdata_dir`: This is the directory where you store your symbolic link to Yunohost applications.
- `ynh_symlink.conf_dir`: This is the directory where you store your symbolic link to the Yunohost configuration files.
### Domain management
```yml
......
......@@ -23,6 +23,11 @@ ynh_install_script_url: https://install.yunohost.org
ynh_admin_password: MYINSECUREPWD_PLZ_OVERRIDE_THIS
ynh_symlink:
enabled: True
appdata_dir: "/data/var"
conf_dir: "/data/etc/"
# The list of Yunohost domains.
ynh_main_domain: domain.tld
ynh_extra_domains: null
......
......@@ -26,6 +26,37 @@
state: present
tags:
- pkg
- linux
- name: Create apps and config directories
ansible.builtin.file:
path: "{{ item }}"
state: directory
mode: 0770
loop:
- "{{ ynh_symlink.appdata_dir }}"
- "{{ ynh_symlink.conf_dir }}"
tags:
- linux
when: ynh_symlink.enabled
- name: Create symbolic link for Yunohost apps data directory
ansible.builtin.file:
src: /var/www/
dest: "{{ ynh_symlink.appdata_dir }}/www_symlink"
state: link
tags:
- linux
when: ynh_symlink.enabled
- name: Create symbolic link for Yunohost configuration directory
ansible.builtin.file:
src: /etc/yunohost/
dest: "{{ ynh_symlink.conf_dir }}/yunohost_symlink"
state: link
tags:
- linux
when: ynh_symlink.enabled
- name: Test if Yunohost is already installed
ansible.builtin.stat: path=/etc/yunohost/installed
......
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