diff --git a/README.md b/README.md index bb9a93ea13a4f17008203564926b30e5285b8890..678037f5d4327d271262db65035ff87b47894094 100644 --- a/README.md +++ b/README.md @@ -10,40 +10,47 @@ 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 -yunohost: - # Link to the install script - install_script_url: https://raw.githubusercontent.com/YunoHost/install_script/master/install_yunohost - # The main domain, then a list of other domains. - domain: example.com - extra_domains: - - example2.com - - example3.com - # Yunohost admin password - password: MYINSECUREPWD_PLZ_OVERRIDE_THIS - # If you don't want to use a noho.st url - ignore_dyndns: False - # The list of apps you want to install. - apps: - - label: Tiny Tiny RSS # Label is important, it's a reference for the Playbook. - link: ttrss # It can be the name of an official app or a github link - args: # Provide here args. Path and domain are mandatory, other args depend of the app (cf manifest.json of app). - path: /ttrss - domain: example.com - # The list of frontend users. - users: - - name: user1 # user which uses the default domain for its account - pass: p@ssw0rd - firstname: Jane - lastname: Doe - domain: '{{ domain }}' - - name: user2 # user which uses the first extra_domain for its account - pass: p@ssw0rd - firstname: John - lastname: Doe - domain: '{{ extra_domain.[1] }}' +--- +# Debian 10 script only. +ynh_install_script_url: https://install.yunohost.org + +ynh_admin_password: uo3A2iq4CtkUdt + +# The list of domains. +ynh_main_domain: poclydra.eu +ynh_extra_domains: + - forum.poclydra.eu + - wiki.poclydra.eu +ynh_ignore_dyndns_server: False + +# The list of Yunohost users. +ynh_users: + - name: user1 + pass: q97CrbNHJFKuWz + firstname: Jane + lastname: Doe + mail_domain: poclydra.eu + +# 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. + domain: wiki.poclydra.eu + path: / + admin: user1 + is_public: no + - label: Discourse + link: discourse + args: + domain: forum.poclydra.eu + path: / + admin: user1 + is_public: yes ``` Dependencies @@ -54,20 +61,102 @@ None. Example Playbook ---------------- ```yml -- name: Provision servers - hosts: all - remote_user: root - pre_tasks: - - name: Update all packages and index - ansible.builtin.apt: - upgrade: dist - update_cache: yes - +--- +- name: Install Yunohost on Debian Server + hosts: dev + become: True + tags: + - deploy + roles: - - { role: sylvainar.yunohost } + - ansible-yunohost ``` License ------- GPL-3.0 + +------------------------------------------------------- + +ansible-yunohost +========= + +Deployez Yunohost avec Ansible ! + +Prérequis +------------ + +Aucun. + +Role Variables +-------------- + +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. +ynh_install_script_url: https://install.yunohost.org + +ynh_admin_password: uo3A2iq4CtkUdt + +# The list of domains. +ynh_main_domain: poclydra.eu +ynh_extra_domains: + - forum.poclydra.eu + - wiki.poclydra.eu +ynh_ignore_dyndns_server: False + +# The list of Yunohost users. +ynh_users: + - name: user1 + pass: q97CrbNHJFKuWz + firstname: Jane + lastname: Doe + mail_domain: poclydra.eu + +# 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. + domain: wiki.poclydra.eu + path: / + admin: user1 + is_public: no + - label: Discourse + link: discourse + args: + domain: forum.poclydra.eu + path: / + admin: user1 + is_public: yes +``` + + +Dépendances +------------ + +Aucune. + +Exemple de Playbook +---------------- +```yml +--- +- name: Deploy Yunohost on Debian Server + hosts: dev + become: True + tags: + - deploy + + roles: + - ansible-yunohost +``` + +License +------- + +GPL-3.0 \ No newline at end of file