ansible

Ansible: Docker image nem frissül build során

Ansible logó
Probléma: Alkalmazásfejlesztés közben rendszeresen előfordul, hogy a fejlesztés során készülő Docker image-ek tagje (címkéje) ugyanaz. Ha a Docker image-et Ansible docker_image moduljával készíted, akkor az image nem frissül.
Megoldás:

Ansible: The PyMySQL (Python 2.7 and Python 3.X) or MySQL-python (Python 2.X) module is required

Ansible logó
Probléma : fatal: [127.0.0.1]: FAILED! => {"ansible_facts": {"discovered_interpreter_python": "/usr/bin/python3"}, "changed": false, "msg": "The PyMySQL (Python 2.7 and Python 3.X) or MySQL-python (Python 2.X) module is required."}
Azaz hiányzik a pymysql modul.

Ansible: The Python 2 bindings for rpm are needed for this module

Ansible logó
Probléma: fatal: [127.0.0.1]: FAILED! => {"changed": false, "msg": "The Python 2 bindings for rpm are needed for this module. If you require Python 3 support use the `dnf` Ansible module instead.. The Python 2 yum module is needed for this module. If you require Python 3 support use the `dnf` Ansible module instead."}

A 2.8-as Ansible alapértelmezetten a Python 3-as verziójával próbál futni (mivel ugye a 2.x támogatása hamarosan véget ér). Azonban a 3-as Python verzióhoz nem érhető el a yum modul, a javasolt dnf modul pedig nem használható CentOS 7-en mivel ott még yum van.

Ansible: AttributeError: 'Task' object has no attribute 'async_val'

Ansible logó

Probléma: Az általad futtatott playbook teljes rendszerfrissítésre is tartalmaz utasításokat. A frissítés utáni utasítások ugyanakkor nem futnak le, csak a következő hibaüzenetet kapod:

Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/ansible/executor/task_executor.py", line 130, in run
    for array in ['warnings', 'deprecations']:
  File "/usr/lib/python2.7/site-packages/ansible/executor/task_executor.py", line 528, in _execute
    try:
  File "/usr/lib/python2.7/site-packages/ansible/plugins/action/normal.py", line 43, in run
    wrap_async = self._task.async_val and not self._connection.has_native_async
AttributeError: 'Task' object has no attribute 'async_val'