Quando tentei rodar o playbook deu erro com a seguinte mensagem abaixo:
$ ansible-playbook playbook.yml -u ubuntu --private-key iac-alura.pem -i hosts.yml [WARNING]: Invalid characters were found in group names but not replaced, use -vvvv to see details ERROR! 'pip' is not a valid attribute for a Play
The error appears to be in '/home/irlani/iac/playbook.yml': line 1, column 3, but may be elsewhere in the file depending on the exact syntax problem.
The offending line appears to be:
- hosts: terraform-ansible ^ here
Assim está meu código:
hosts: terraform-ansible tasks:
name: Instalando o python3 e virtualenv apt: pkg:
- python3
- virtualenv update_cache: yes become: yes
name: Instalando dependencias com pip (django e django rest) pip: virtualenv: /home/ubuntu/tcc/venv name:
- django
- djangorestframework