Quando eu adiciono o shell para iniciar o playbook e inicio vagrant por ele, aparece o erro abaixo e o playbook não é iniciado.
ansible: Processing triggers for man-db (2.8.3-2ubuntu0.1) ... ==> ansible: Running provisioner: shell... ansible: Running: inline script ansible: usage: ansible-playbook [-h] [--version] [-v] [-k] ansible: [--private-key PRIVATE_KEY_FILE] [-u REMOTE_USER] ansible: [-c CONNECTION] [-T TIMEOUT] ansible: [--ssh-common-args SSH_COMMON_ARGS] ansible: [--sftp-extra-args SFTP_EXTRA_ARGS] ansible: [--scp-extra-args SCP_EXTRA_ARGS] ansible: [--ssh-extra-args SSH_EXTRA_ARGS] [--force-handlers] ansible: [--flush-cache] [-b] [--become-method BECOME_METHOD] ansible: [--become-user BECOME_USER] [-K] [-t TAGS] ansible: [--skip-tags SKIP_TAGS] [-C] [--syntax-check] [-D] ansible: [-i INVENTORY] [--list-hosts] [-l SUBSET] ansible: [-e EXTRA_VARS] [--vault-id VAULT_IDS] ansible: [--ask-vault-pass | --vault-password-file VAULT_PASSWORD_FILES] ansible: [-f FORKS] [-M MODULE_PATH] [--list-tasks] ansible: [--list-tags] [--step] [--start-at-task START_AT_TASK] ansible: playbook [playbook ...] ansible: ansible-playbook: error: too few arguments ansible: /vagrant/configs/ansible/playbook.yml: line 1: -: command not found ansible: /vagrant/configs/ansible/playbook.yml: line 2: $'handlers:\r': command not found ansible: /vagrant/configs/ansible/playbook.yml: line 3: -: command not found ansible: /vagrant/configs/ansible/playbook.yml: line 4: $'service:\r': command not found ansible: /vagrant/configs/ansible/playbook.yml: line 5: name:: command not found ansible: /vagrant/configs/ansible/playbook.yml: line 6: state:: command not found ansible: /vagrant/configs/ansible/playbook.yml: line 7: become:: command not found ansible: /vagrant/configs/ansible/playbook.yml: line 8: $'\r': command not found ansible: /vagrant/configs/ansible/playbook.yml: line 9: $'tasks:\r': command not found ansible: /vagrant/configs/ansible/playbook.yml: line 10: -: command not found ansible: /vagrant/configs/ansible/playbook.yml: line 11: $'apt:\r': command not found ansible: /vagrant/configs/ansible/playbook.yml: line 12: update_cache:: command not found ansible: /vagrant/configs/ansible/playbook.yml: line 13: cache_valid_time:: command not found ansible: /vagrant/configs/ansible/playbook.yml: line 14: name:: command not found ansible: /vagrant/configs/ansible/playbook.yml: line 15: state:: command not found ansible: /vagrant/configs/ansible/playbook.yml: line 16: become:: command not found ansible: /vagrant/configs/ansible/playbook.yml: line 17: $'\r': command not found ansible: /vagrant/configs/ansible/playbook.yml: line 18: -: command not found ansible: /vagrant/configs/ansible/playbook.yml: line 19: $'mysql_user:\r': command not found ansible: /vagrant/configs/ansible/playbook.yml: line 20: login_user:: command not found ansible: /vagrant/configs/ansible/playbook.yml: line 21: name:: command not found
The SSH command responded with a non-zero exit status. Vagrant assumes that this means the command failed. The output for this command should be in the log above. Please read the output to determine what went wrong.