Python

Alles zu diesem Thema

Ansible – How to create reusable tasks

Ansible – How to create reusable tasks

Ansible is known for its simplicity, lightweight footprint and flexibility to configure nearly any device in your infrastructure. Therefore it's used in large scale environments shared between teams or departments. Often tasks could be used in multiple playbooks to combine update routines, setting downtimes at an API or update data at the central asset management. To use external tasks in Ansible we use the include_task module. This module dynamically includes the tasks from the given file....

Ansible – Loop over multiple tasks

Ansible – Loop over multiple tasks

The last time I wrote about Ansible and the possibility to use blocks to group multiple tasks. Which you can read here. Sadly this feature does not work with loop, so there is no clean way to loop over multiple tasks in a play without writing the same loop statement at tasks over and over. But when we come across the need of tasks which depend on each other, for example, we execute a script with a certain parameter and its result is necessary for the upcoming tasks. Let's go through a common...

Ansible – should I use omit filter?

When we talk about Ansible, we more and more talk about AWX or Tower. This Tool comes in handy when you work with Ansible in a environment shared with colleagues or multiple teams.In AWX we can reuse the playbooks we developed and share them with our colleagues on a GUI Platform.Often we need a bit of understanding how a playbook is designed or if a variable need to be defined for the particular play. This can be much more tricky when sharing templates to people unaware of your work. This is...

NFC-Leser mit einem Raspberry Pi

In meinem letzten Blogpost habe ich schon etwas über NFC und RFID geschrieben. In diesem Blog erstellen wir einen Leser, mit dem man beispielsweise auch NFC-fähige Karten oder Chips auslesen kann. Was brauchen wir? Einen Raspberry Pi Female-Female Jumperkabel RFID-Reader MFRC522 Modul Hier benutze ich das zurzeit das aktuellste Modell des Raspberrys, den 3 B+. Natürlich sind auch ältere Pi Modelle für dieses Projekt ausreichend. Die Jumperkabel sowie das Modul können sehr leicht und...