Ansible Role: Yunohost V.0.1.0 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):