DevOps workflows and reliable automation

The company I work for provides a broad scope of IT services to our customers and to be able to offer the best quality services, we rely heavily on automation, especially Red Hat Ansible. In this blog post, we’ll look at what our workflow looks like when automating with …

more ...

TIL how to use Ansible-inventory for native ssh-connections

Actually I did not learn this today but already some years ago. Sometimes I need to connect to remote servers that have no hosts-file or dns-entry. But I don’t want to remember IP-addresses!

Luckily I do have these servers defined in Ansible’s hosts-file and I could theoretically …

more ...

TIL how to get a plaintext list of Ansible hosts

There was a need to iterate over the hosts in an Ansible inventory-file (don’t ask). After fiddling around with grep and sed, I found an easier method:

ansible-inventory --list all | jq " ._meta.hostvars| keys[]"

ansible-inventory --list all lists all hosts including their variables in a nice big json response …

more ...

TIL how to alter gitlab-ci include-directives

We have a set of common pipeline jobs that are shared among different projects in Gitlab. We include them like this:

include:
  - project: 'shared/gitlab/linting'
    ref: master
    file:
      - markdown.yml
      - ansible.yml

When you do this, these included jobs get executed with the runner that is defined in the …

more ...