Ansible collection:Ansible Yunohost V1.0.1 is out!🎉 Let's contribute!


Bonjour Ă  tous,
Je suis Arthur BOUDREAULT, stagiaire en administration Linux pour Lydra, un collectif qui aide les entreprises du numérique à déployer leurs applications web rapidement et sans coupure de service.

Dans le cadre de ce stage qui va durer 2 mois nous souhaitons faire une refonte concernant la manière dont nous déployons certaines applications et notamment nos serveurs de communautés basés sur Discourse et que nous voulons coupler avec des Wikis grâce à un SSO.
Comme celui des Compagnons du DevOps ( ou le futur de la communauté de Froggit (

C’est pour cette raison que notre choix s’est porté sur Yunohost. C’est un projet qui nous tient à cœur de par sa philosophie et sa polyvalence.

Nous allons utiliser Ansible pour gérer la partie automatisation de l’installation de Yunohost et des applications dont nous avons besoin. C’est pourquoi nous voulions utiliser et contribuer aux rôles ansible déjà présents ou en créer un nouveau s’ils sont abandonnés. Lydra, donc @cchaudier est aussi présent sur le forum. Il est prêt à maintenir le rôle.

Nous cherchons donc à prendre contact avec toute la communauté YunoHost pour savoir si certains ici utilisent déjà l’un des rôles disponibles. Et si oui lequel ? Avez-vous rencontré des difficultés en les utilisant ? Y’ a-t-il des fonctionnalités manquantes que nous pourrions développer ?

Nous cherchons également à prendre contact avec @e-lie @sylvainar et @therojam qui ont déjà travaillé dans ce sens :

Nous souhaitons savoir s’ils sont ouverts aux contributions, car les rôles n’ont pas l’air maintenus depuis des mois.

Bien évidemment toute contribution de la communauté sera également appréciée.
Bonne journée à tous de la part de l’équipe Lydra.

Hi everyone,
I’m Arthur BOUDREAULT, intern in Linux administration for Lydra, a collective that helps digital companies to deploy their web applications quickly and without service interruption.

During this 2 months internship, we want to redesign the way we deploy some applications, especially our community servers based on Discourse and that we want to link with Wikis thanks to a SSO.
Like les Compagnons du DevOps ( or the future of the Froggit community (

That’s why we chose Yunohost.It’s a project that is close to our hearts because of its philosophy and its versatility.

We are going to use Ansible to manage the automation part of the installation of Yunohost and the applications we need. That’s why we wanted to use and contribute to the ansible roles already present or create a new one if they are discontinued. Lydra, so @cchaudier is also present on the forum. He is willing to maintain the role.

So we are looking to contact the whole YunoHost community to know if some people here already use one of the available roles. And if so which one? Have you encountered any difficulties using them? Are there any missing features that we could develop?

We are also looking to contact @e-lie @sylvainar and @therojam who have already worked on this:

We want to know if they are open to contributions, because the roles don’t seem to be maintained for months.

Of course any contribution from the community will also be appreciated.
Good day to all from the Lydra team.


(pinging @ljf too as he might have some experience with yunohost/ansible :stuck_out_tongue_winking_eye: )


My last setup i did it without my ansible role as it was broken due to ynh cli change.
Personally, i have not the time currently to contribute on that but maybe i can find some hours in 2 weeks. It’s possible i have unpush works…

Yes, I would be delighted to see what personal changes you’ve done to the role. Did you use one of roles I mentioned above?
Moreover you tell me that:

it was broken due to ynh cli change

Can you be more specific regarding that?

Thank you for your help

Yep it’s a fork of sylvainar.

Yunohost made some broken change in yunohost cli. So some command from ynh 3.x doesn’t work in ynh 4.x … In user i think ( --email have disappear) and maybe in other command.

1 Like

Thank you, I will check that!

Hi :D,

I’ve spent some time on the role but I don’t currently use or maintain it.

Last time I thought about it, it seemed to me that the ideal but more time consuming way to deepen and stabilize the usage of yunohost though ansible would be to

  • write python ansible modules (ynh_user, ynh_app, ynh_domain, …) to translate yunohost resources into “ansible resources”.
  • … doing it by calling the ynh api rather than using the cli in shell tasks.

This remark follow my understanding of Ansible best practices and the fact that the main limit of the differents roles if I remember correctly, is that the idempotency (and so the reliability) of the differents tasks is hard to enforce because of the use of shell tasks invoking the ynh cli. So once updated, the role would ok to install yunohost but not to manage the users/domain/etc on the long term using Ansible.

I’ve barely started developing in this direction months ago but i’ve no real result to show.

I could be interested to help update the role (and especially unit testing it using molecule) or start developing ansible modules for the main yunohost resources.

I really like Yunohost and Ansible and think a good integration could be really useful. I’ve got time and a quite good idea of the path but not sure about my motivation (not always up). At least we can talk about all that !


Update to this topic:
We were able to reach @e-lie directly and speak with him and @Hadrien (another ynh contributor).
Today we are proud to announce that the first release of our upgraded Ansible role for Yunohost is out!
You can find it here: Ansible Galaxy and if you want to contribute, every little help will be appreciated! You can find the repo here.

As mentioned in the readme, this role is only good for a fresh install of Yunohost, users and apps for now but it will probably evolve over time.
After my internship, @cchaudier and the Lydra team will carry on my work and will maintain this role.
Make sure to check it out, test it out yourself and if you have any suggestions and want to contribute to this project, feel free to reach me!

Good day to all from the Lydra team.


Small update: I began drafting an Ansible module for YunoHost apps.
A module is complementary to a role. Its goal is to apply the idempotency concept of Ansible: applying (once or multiple times) the same task/playbook should only change what’s required to make the current config match the desired state (e.g. install the app if it’s not there or update its settings if it’s already installed), with no side effect.
It’s in beta (tested a bit by @alexutadotlinux5733, thanks :slight_smile: ) and it’s available here (you need to put the python file in a library/ folder at the root of your Ansible project):


Hi, thanks for reaching out,
as you could, may see, i was just improving the role of @sylvainar,
since it’s a fork.
I hope you could profit of my work and develop it further.
That’s what’s open-source is for!



Nous n’avions pas prévenu ici, mais nous avons sorti la v0.1.3 de notre role Ansible avant la fin du stage d’@alexutadotlinux5733.

Suite à ce stage nous avons décidé de prendre @alexutadotlinux5733 en alternance chez Lydra. Il continuera donc à travailler avec moi sur ce rôle, entre autres projets :frog:. Bravo à lui ! :partying_face:

Nous avons encore pas mal de travail notamment sur l’automatisation de la configuration des posts installations, mais surtout sur la gestion des données et des sauvegardes.

Nous pensons à créer une collection pour séparer la partie installation de la partie sauvegarde.
Nous voulons rendre encore plus robuste YunoHost en utilisant les possibilités du cloud.

Le mieux pour suivre le projet et être informé des sorties c’est de vous abonner aux notifications du miroir du projet sur Github.

Le projet va continuer, car nous allons l’utiliser en interne et nous avons quelques prospects intéressés.

La suite bientôt… :eyes:


We didn’t warn here, but we released the v0.1.3 of our Ansible role before the end of @alexutadotlinux5733’s internship.

After is internship we decided to take @alexutadotlinux5733 as a work-study at Lydra. He will continue to work with me on this role, among other projects :frog:. Congratulations to him ! :partying_face:

We still have quite a lot of work especially on the automation of the configuration of the post-installations, but also on the management of the data and the backups.

We are thinking of creating a collection to separate the installation part from the backup part.
We want to make YunoHost even more robust by using the possibilities of the cloud.

The best way to follow the project and to be informed about the releases is to subscribe to the project mirror on Github notifications.

The project will continue, as we will use it internally and we have some interested prospects.

More soon… :eyes:


Hello guys,
We have decided to carry on our work on this role and transform it into a collection that is soon to be released!
For those who don’t know about collections, an Ansible collection is basically a bundle of roles, modules…
Of course, this work will help us bootstrap more Yunohost instances in the future.

More to come in the coming weeks :wink:


Français: Ansible Yunohost v1.0.1 est sorti !
Vous pouvez la trouver ici

Pour faire court, au fur et à mesure que nous avons développé des fonctionnalités, il est devenu nécessaire pour nous de diviser notre rôle en plusieurs rôles dans une collection Ansible. De cette façon, nous pouvons facilement développer sur un rôle sans que cela n’affecte l’ensemble.
Il y a maintenant quatre rôles différents, et vous pouvez les utiliser tous ou ne choisir que celui ou ceux dont vous avez besoin :

  • ynh_setup : Pour installer Yunohost avec Ansible
  • ynh_config : Pour configurer Yunohost avec Ansible
  • ynh_apps : Pour installer les applications de Yunohost avec Ansible
  • ynh_backup : Pour sauvegarder Yunohost avec Ansible

N’hésitez pas à poser des questions ou à fournir des commentaires si vous le pouvez et la prochaine fois que vous avez l’intention d’installer Yunohost, peut-être envisager d’utiliser notre collection pour accélérer le processus d’installation :wink:

English: Ansible Yunohost v1.0.1 is out!
You can find it here

Long story short, as we grew in features, it became necessary for us to split our role into various roles in an Ansible collection. This way we can easily develop on one role without it affecting the whole.
There are now four different roles, and you can use them all or only pick the one(s) you need:

  • ynh_setup: To install Yunohost with Ansible
  • ynh_config: To configure Yunohost with Ansible
  • ynh_apps : To install Yunohost apps with Ansible
  • ynh_backup: To backup Yunohost with Ansible

Feel free to ask any questions or provide feedback if you can and next time you intend to install Yunohost, maybe consider using our collection to speed up the setup process :wink: