1
0
Fork 0

fix for ynh-12: specifying initial admin user for post-install

This commit is contained in:
Julian Foad 2025-05-01 12:34:40 +01:00
parent f77da003b8
commit 2bc9cf14aa
4 changed files with 11 additions and 8 deletions

View file

@ -15,10 +15,9 @@ Les variables par défaut sont disponibles dans `default/main.yml` cependant il
### Installation de Yunohost
```yml
# Script pour Debian 10 uniquement.
ynh_install_script_url: https://install.yunohost.org
ynh_admin_password: MYINSECUREPWD_PLZ_OVERRIDE_THIS
ynh_admin_user: "{{ ynh_users[0] }}"
ynh_dir: "/data/yunohost"
@ -37,7 +36,7 @@ ynh_data_dirs_enabled: True
```
- `ynh_install_script_url` est l'url du 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 à linterface dadministration du serveur.
- `ynh_admin_user.{name,fullname,pass}` est le utilisateur permettant d'accéder à linterface dadministration du serveur.
- `ynh_data_dirs.enabled`: active les liens symboliques et permet de déplacer les répertoires de configurations et de données de YunoHost où vous le desirez. Par défaut, cette valeur est à `True`. Nous utilisons les liens symboliques car le dossier `/data` nous sert à faire des sauvegardes de type _object storage_.
- `ynh_data_dirs.path`: il s'agit des répertoires où stocker les données de configuration de Yunohost ainsi que les applications.

View file

@ -15,10 +15,9 @@ Default variables are available in `default/main.yml` however it is necessary to
### Yunohost Installation
```yml
# Debian 10 script only.
ynh_install_script_url: https://install.yunohost.org
ynh_admin_password: MYINSECUREPWD_PLZ_OVERRIDE_THIS
ynh_admin_user: "{{ ynh_users[0] }}" # if the admin is listed first in 'ynh_users'
ynh_dir: "/data/yunohost"
@ -37,7 +36,7 @@ ynh_data_dirs_enabled: True
```
- `ynh_install_script_url` The url provided downloads the 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_admin_user.{name,fullname,pass}` is the user used to access to the server's administration interface.
- `ynh_data_dirs.enabled`: Enables symbolic links and allows you to move YunoHost's configuration and data directories wherever you want. By default, this value is set to `True`. We use symbolic links because the `/data` folder is used by us to make _object storage_ backups.
- `ynh_data_dirs.path`: these are the directories where Yunohost configuration data and applications are stored.

View file

@ -21,7 +21,10 @@
# Debian 10 script only.
ynh_install_script_url: https://install.yunohost.org
ynh_admin_password: MYINSECUREPWD_PLZ_OVERRIDE_THIS
ynh_admin_user:
name: ~
fullname: ~
pass: ~
ynh_dir: "/data/yunohost"

View file

@ -94,7 +94,9 @@
ansible.builtin.command:
yunohost tools postinstall \
--domain "{{ ynh_main_domain }}" \
--password "{{ ynh_admin_password }}" \
--username "{{ ynh_admin_user.name }}" \
--fullname "{{ ynh_admin_user.fullname }}" \
--password "{{ ynh_admin_user.pass }}" \
{% if ynh_ignore_dyndns_server %} --ignore-dyndns {% endif %}
when: not ynh_file_install.stat.exists
tags: