troet.cafe ist Teil eines dezentralisierten sozialen Netzwerks, angetrieben von Mastodon.
Hallo im troet.cafe! Dies ist die derzeit größte deutschsprachige Mastodon Instanz zum tröten, neue Leute kennenlernen, sich auszutauschen und Spaß zu haben.

Verwaltet von:

Serverstatistik:

7 Tsd.
aktive Profile

Mehr erfahren

#ansible

13 Beiträge13 Beteiligte0 Beiträge heute

Hunting down easter eggs & putting them all in a single basket? Hopefully you're not doing the same with your VMs - the new ProxLB v1.1.1 is out, now!

#ProxLB is a loadbalancer for #Proxmox clusters that balances guests across your nodes based on cpu, memory or (local) disk size. It also comes with additional features like:
* Affinity / anti-affinity rules
* Maintenance mode
* Node evacuation (based on best resource usage)
* Best node evaluation for CI/CD (e.g. #Ansible or #Terraform)

Antwortete Johannes Kastl

OK, I managed to improve lots of things in those setups and make the setup more reliable (even in case it takes really really long for everything to be up).

codeberg.org/johanneskastl/git

Now with four branches, one for Gitlab installed via helm chart and one using the Gitlab Operator.
And each of them with and without a Gitlab Runner being installed into the cluster.

Summary card of repository johanneskastl/gitlab_on_k3s_vagrant_libvirt_ansible
Codeberg.orggitlab_on_k3s_vagrant_libvirt_ansibleVagrant-libvirt setup that creates a VM with k3s and installs GitLab in the cluster
#GitLab#Kubernetes#k3s

Sometimes it feels like Ansible is a lot more friendly with home lab and self hosting than Terraform. A lot of things I want to do with Terraform do not have official providers, while Ansible does have a lot of official modules.

I'm not looking for a solution, just making an observation.

Ein paar Merge Requests für die Doku von ansible semaphore erstellt. Ich mag Semaphore, aber die Doku ist ausbaufähig 🙈
Mit all den offenen Doku Merge Requests, die der anderen und meiner, dürfte die Doku deutlich besser werden. Auch wenn es nicht meine Doku ist, freue ich mich, sollten alle MRs demnächst gemerged werden :)

What do you guys do about breaking home directories in #Linux.

I mean every desktop env after some time gets flaky and then you feel like you wanted a reset but you don't want a reset because it's a lot of work to reconfigure everything and you will probably forget about details.
I mean there's #nixos but despite me liking the idea I don't like the implementation

Are there highly mature #Ansible roles for like #gnome #kde or whatever?

How do you tackle this?

Antwortete Johannes Kastl

OK, I found a way that seems to work in all phases:
- the migrations pod is not yet started (PodInitializing)
- the migrations pod is running
- the migrations pod has been Completed

This part waits for the pod to exist (no matter its state):
codeberg.org/johanneskastl/git

This part waits for the pod to be in Completed state:
codeberg.org/johanneskastl/git

I did not use the module's wait functionality as I could not get it to work the way I want. So I used what I often use: Ansble's `until` together with a `json_query` filter.

Codeberg.orggitlab_on_k3s_vagrant_libvirt_ansible/ansible/playbook-gitlab_installation.yml at maingitlab_on_k3s_vagrant_libvirt_ansible - Vagrant-libvirt setup that creates a VM with k3s and installs GitLab in the cluster
#Ansible#kubernetes#k8s

TIL: There is probably breaking change in Ansible 2.13 in ansible.builtin.env lookup concerning undefined variables.

According to docs.ansible.com/ansible/lates

Old Ansible:
'{{ lookup("env", "CI_PIPELINE_IID") | default("local") }}'

New Ansible:
'{{ lookup("env", "CI_PIPELINE_IID", default="local") }}'

Older version in new Ansible returns empty string even when the variables is not defined.

docs.ansible.comansible.builtin.env lookup – Read the value of environment variables — Ansible Community Documentation
Antwortete Johannes Kastl

Fifth and (it really seems) last round for the #NixOS #Ansible bubble:

Thanks to @nebucatnetzer I tried installing ansible "the other way round". Rather than trying to install Ansible and have a customized python3 (with hvac and kubernetes modules etc.) as a "build input" I have tried the other way round: Adding ansible and ansible-core to the python package:

```
(pkgs.python3.withPackages (python-pkgs: [
python-pkgs.ansible
python-pkgs.ansible-core
python-pkgs.hvac
python-pkgs.kubernetes
]))
```

A short test was successful, tasks delegated to localhost found the kubernetes module and could successfully do things! Hooray!

Today, #IPv6 to the rescue.

I broke DHCP for the legacy IP space on my pfSense router today but thanks to running dual stack I could reconnect using the IPv6 address and fix things. I was trying to move to using #Ansible for managing pfSense and somehow despite getting zero errors and Ansible reporting things as idempotent, things were unhappy.

I managed to get back into the router and deleted the new records, recreating them manually and everything is working again. No clue what I broke yet, but yay for IPv6.

Dear #Ansible #Kubernetes users,

I can tell Ansible to wait until a Kubernetes pod is running and ready using something like this:

- kubernetes.core.k8s_info:
api_version: v1
kind: Pod
namespace: gitlab
label_selectors:
- app=webservice
wait_condition:
status: "True"
type: Ready
wait: true
wait_sleep: 10
wait_timeout: 1800

However, I do not succeed in telling Ansible to wait until a pod was completed successfully. The following code works but detects a pod that is not yet running (PodInitializing) as well and proceeds.

- kubernetes.core.k8s_info:
[...]
wait_condition:
# no "reason" given here
status: "False"
type: Ready
[...]

As soon as I add a "reason" this task runs into a timeout and does no longer work. No matter what I use as the "reason". "Completed", "Succeeded", "Terminated", ...

The module documentation is rather vague on this...

docs.ansible.com/ansible/lates

docs.ansible.comkubernetes.core.k8s_info module – Describe Kubernetes (K8s) objects — Ansible Community Documentation