Include Ansible playbooks sorted

Use sorted list for included files vs random provided by with_fileglob. - name: Include tasks include_tasks: "{{item}}" loop: "{{ query('fileglob', 'tasks/*.yaml') | sort }}"

September 23, 2022 · 1 min · Pablo Iranzo Gómez

Check Agent status per state

Check agent status per state watch -d "oc get agent -A -o jsonpath='{range .items[*]}{@.status.debugInfo.state}{\"\n\"}{end}' |sort | uniq --count"

August 10, 2022 · 1 min · Pablo Iranzo Gómez

How to check if a system is virtual

I was improving a playbook in Ansible and wanted to find a way to find if a system was virtual or not to decide about some tunning like setting tuned-adm profile virtual-guest or disable the power off when the lid is closed. After some research and try-except situations I got to this one that seemed to work (I had to tune it as one desktop machine was missing the /sys entry I was using before): ...

May 10, 2021 · 3 min · Pablo Iranzo Gómez

Configuring OpenShift with self-contained NTP

Introduction In a regular OpenShift environment, NTP server is more less like this: Diagram In a self-contained cluster with no connection to external networks NTP server is not reachable, but a reachable NTP server is required for proper cluster synchronization. Cluster does use SSL certificates that require validation and might fail if the dates between the systems are not in sync or at least pretty close in time. Diagram We’ve several components already available in our OpenShift cluster that are very useful: ...

December 7, 2020 · 5 min · Pablo Iranzo Gómez

Dell racadm remote ISO load

In order to test IPv6 deployment on Dell hardware I was in need to patch the servers to ensure that UEFI boot mode is in use. Normally I would had use the DSU that runs from within Linux, but as the servers are part of an OpenShift installation (using baremetal-deploy) and using CoreOS as the underlying system I wanted to load ISO from HTTP server on the deployhost (running RHEL). The command is not that hard, let’s first define some variables: ...

May 12, 2020 · 1 min · Pablo Iranzo Gómez
This blog is a participant in the Amazon Associate Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to Amazon.