Estou obtendo o seguinte erro ao executar o comando: ansible-playbook playbook.yml -u ubuntu --private-key minhachave.pem -i hosts.yml
[WARNING]: Invalid characters were found in group names but not replaced, use -vvvv to see details ERROR! We were unable to read either as JSON nor YAML, these are the errors we got from each: JSON: Expecting value: line 1 column 1 (char 0)
Syntax Error while loading YAML. did not find expected '-' indicator
The error appears to be in '/home/aws/learn-terraform-aws-instance/playbook.yml': line 2, column 1, but may be elsewhere in the file depending on the exact syntax problem.
The offending line appears to be:
- hosts: terraform-ansible tasks: ^ here
Segue abaixo como está meu código: