Ansible collection:Ansible Yunohost V1.1.4 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 (https://forum.compagnons-devops.fr/) ou le futur de la communauté de Froggit (https://lab.frogg.it/).

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 (https://forum.compagnons-devops.fr/) or the future of the Froggit community (https://lab.frogg.it/).

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.

11 Likes

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

2 Likes

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…

1 Like

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 !

4 Likes

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.

6 Likes

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):

5 Likes

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!

3 Likes

Bonjour,

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:


Hello,

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:

7 Likes

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:

4 Likes

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:

9 Likes

:fr: Ansible Yunohost v1.1.0 est sortie !
Vous pouvez la trouver ici

Il s’agit de notre première itération majeure pour notre collection Ansible pour YunoHost. Nous nous sommes focalisés sur des manières différentes de sauvegarder YunoHost : Avec Borg et Restic.

Vous avez désormais la possibilité d’appeler deux rôles Ansible externes qui vont se charger de sauvegarder YunoHost ou votre système, vos fichiers…
Nous avons intégré un switch qui permet facilement d’activer ou de désactiver ces rôles suivant vos besoins.
Enfin, nous avons retravaillé notre script de sauvegarde YunoHost avec une tâche cron pour y intégrer un système de purge des anciennes sauvegardes de façon à ne pas saturer votre disque dur.

N’hésitez pas à poser des questions ou à fournir des commentaires si vous le pouvez. On approche bientôt des 100 téléchargements sur Ansible-Galaxy :wink:

:us: Ansible Yunohost v1.1.0 is out!
You can find it here

This is our first major iteration for our Ansible collection for YunoHost. We focused on different ways to back up YunoHost: With Borg and Restic.

You now have the possibility to call two external Ansible roles that will take care of backing up YunoHost or your system, your files…
We have integrated a switch that allows you to easily activate or deactivate these roles according to your needs.
Finally, we have reworked our YunoHost backup script with a cron task to integrate a purge system for old backups so as not to saturate your hard disk.

Feel free to ask questions or provide feedback if you can. We are approaching 100 downloads on Ansible-Galaxy :wink:

7 Likes

:fr: Ansible Yunohost v1.1.1 est sortie !
Vous pouvez la trouver ici

Il s’agit d’une release mineure qui met à jour le rôle Ansible Borg utilisé. En effet, nous nous sommes rendu compte que la version de Borgmatic n’était pas fixée dans le rôle. Par conséquent, le rôle mettait en place des commandes Borgmatic avec des paramètres dépréciés.

N’hésitez pas à poser des questions ou à fournir des commentaires si vous le pouvez. On a dépassé les 100 téléchargements :smiley:

:us: Ansible Yunohost v1.1.1 is out!
You can find it here

This is a minor release that updates the Ansible Borg role used. Indeed, we discovered that the Borgmatic version was not set in the role. As a result, the role was implementing Borgmatic commands with deprecated parameters.

Feel free to ask questions or provide feedback if you can. We have reached more than 100 downloads

3 Likes

Hello guys :slight_smile:
We are working on integrating Docker inside YunoHost through our Ansible collection.
If you have any suggestions, feedback, let us know!

We have also explained the process here

4 Likes

I’m not familiar with Ansible, so I’m sorry if this is a silly or very basic question, but would the docker integration work for existing, non-Ansible Yunohost installations, or would we need to reinstall Yunohost with Ansible for that? Thank you.

1 Like

No,
Fortunately, with Ansible you can use tags. For example, if you only want to run tasks related to Docker you launch it with the docker tag and it will only perform the actions related to Docker and the settings you chose. That’s very convenient to perform very specific actions.

1 Like

:fr: Ansible Yunohost v1.1.2 est sortie !
Vous pouvez la trouver ici

Il s’agit d’une release mineure qui met à jour la version de Restic utilisée par défaut. Il s’agit désormais de la dernière version en date, la 0.14.0, qui introduit la compression dans les snapshots.

N’hésitez pas à poser des questions ou à fournir des commentaires si vous le pouvez. On arrive dorénavant aux 200 téléchargements :smiley:

:us: Ansible Yunohost v1.1.2 is out!
You can find it here

This is a minor release that updates the version of Restic used by default. It is now the latest version, 0.14.0, which introduces compression in snapshots.

Feel free to ask questions or provide feedback if you can. We have almost reached 200 downloads!

4 Likes

:fr: Ansible Yunohost v1.1.3 est sortie !
Vous pouvez la trouver ici

Il s’agit d’une release mineure qui met à jour la version du rôle Borg utilisée par défaut.

Plus de 200 téléchargements désormais ! :smiley:

:us: Ansible Yunohost v1.1.3 is out!
You can find it here

This is a minor release that updates the version of the Ansible Borg role used by default.
More than 200 downloads!

2 Likes