Ancestors

Written by Madic on 2024-11-30 at 08:33

Ich habe ein Problem mit vagrant und frage mich, ob ich die einzige Person bin, die das macht obwohl es für mich ein normales Szenario ist. Anscheinend macht das niemand. Das Problem existiert im Internet nicht

Ich erstelle mit vagrant mehrere VMs und provisioniere sie mit ansible. Natürlich muss auch ansible-galaxy 1x ausgeführt werden. Aber das führt vagrant pro VM aus. Es läuft also 3x, gleichzeitig und kommt sich gegenseitig in die quere was die provisionierung crasht

[#]vagrant #ansible

=> More informations about this toot | More toots from Madic@chaos.social

Written by Frederic on 2024-11-30 at 09:09

@Madic Du willst also nur sicherstellen, dass vor einem vagrant up auf dem Ansible-Controller (= Host) ansible-galaxy gelaufen ist?

Du könntest einen Before-Trigger auf das up-Kommando setzen:

https://developer.hashicorp.com/vagrant/docs/triggers/configuration#commands

=> More informations about this toot | More toots from frederic@chaos.social

Written by Madic on 2024-11-30 at 10:14

@frederic Danke für den Hinweis. Probiere ich aus. Bisher ohne Erfolg, weil pro VM anscheinend ein up ausgeführt wird. Aber vlt liegt es auch an mir. Ich komme mit Ruby nicht zurecht 🙈

=> More informations about this toot | More toots from Madic@chaos.social

Written by Frederic on 2024-11-30 at 10:20

@Madic Du kannst auch den VM-Starten-Teil mit vagrant up von der eigentlichen Ansible-Provisionierung trennen, falls dir das in deinem Szenario helfen kann.

Muss man halt zwei Befehle ausführen (oder Bash-Script).

=> More informations about this toot | More toots from frederic@chaos.social

Written by Madic on 2024-11-30 at 11:44

@frederic

Bei der Recherche nach den Triggern bin ich auf einen anderen Lösungsansatz gestoßen: ansible insgesamt nur 1x ausführen und alle Systeme gleichzeitig provisionieren. Nicht, wie vorher, pro VM ansible ausführen. Damit wird auch ansible-galaxy nur einmal ausgeführt. Sieht bisher gut aus. Mit noch ein paar Kinderproblemen. Wenn fertig, verlinke ich es hier.

Danke für die Hinweise

=> More informations about this toot | More toots from Madic@chaos.social

Written by Frederic on 2024-11-30 at 11:47

@Madic Das ist natürlich die beste Lösung. 👍

Kommt ja auch immer ein bisschen auf den Use-Case an und wie Leute ihre Playbooks/Inventories aufbauen.

(Bin aus dem Thema Vagrant mittlerweile ganz raus, weil's nicht auf Silicon-Macs läuft. 🤷‍♂️)

=> More informations about this toot | More toots from frederic@chaos.social

Toot

Written by Madic on 2024-11-30 at 19:48

@frederic

War eine ganz schöne Herausforderung, es zuverlässig nach meinen Anforderungen hinzubekommen, aber hier ist es:

https://github.com/madic-creates/k3s-git-ops/blob/main/Vagrantfile

Es sollte nicht nur möglich sein, alle VMs gleichzeitig zu erstellen, sondern per vagrant up gezielt auch einzelne. Das hat es schwieriger gemacht

=> More informations about this toot | More toots from Madic@chaos.social

Descendants

Proxy Information
Original URL
gemini://mastogem.picasoft.net/thread/113573634628547263
Status Code
Success (20)
Meta
text/gemini
Capsule Response Time
305.122322 milliseconds
Gemini-to-HTML Time
1.664122 milliseconds

This content has been proxied by September (3851b).