Quando executo o ansible-playbook mostra a seguinte mensagem de erro:
TASK [Instala pacotes de dependencia do sistema operacional] *** [WARNING]: Auto-installing missing dependency without updating cache: python3-apt fatal: [172.18.38.13]: FAILED! => {"changed": false, "msg": "Could not import python modules: apt, apt_pkg. Please install python3-apt package."}
meu arquivo provisioning
---
- hosts: all
tasks:
- name: 'Instala pacotes de dependencia do sistema operacional'
apt:
update_cache: yes
name:
- php7.2
- apache2
- libapache2-mod-php7.2
- php7.2-gd
- python3.7
- python3-apt
- mysql-server
- python-mysqldb
- php7.2-mysql
state: latest
become: yes
- name: 'Cria bando do MySQL'
mysql_db:
name: wordpress_db
login_user: root
state: present