1
resposta

FAILED ao criar aquivo world.txt

Vou deixar o erro abaixo, o que pode ser ?

lsp@DESKTOP-1SOPL89:~/wordpress_com_ansible$ ansible-playbook provisioning.yml -u vagrant -i hosts --private-key .vagrant/machines/wordpress/virtualbox/private_key

PLAY [all] **********************************************************************************************************************************************************************************************************************************

TASK [Gathering Facts] **********************************************************************************************************************************************************************************************************************
ok: [192.168.56.0]

TASK [shell] ********************************************************************************************************************************************************************************************************************************
fatal: [192.168.56.0]: FAILED! => {"changed": true, "cmd": "echo hello > /vagrant/world.txt", "delta": "0:00:00.001868", "end": "2022-11-24 05:10:52.551727", "msg": "non-zero return code", "rc": 2, "start": "2022-11-24 05:10:52.549859", "stderr": "/bin/sh: 1: cannot create /vagrant/world.txt: Directory nonexistent", "stderr_lines": ["/bin/sh: 1: cannot create /vagrant/world.txt: Directory nonexistent"], "stdout": "", "stdout_lines": []}

PLAY RECAP **********************************************************************************************************************************************************************************************************************************
192.168.56.0               : ok=1    changed=0    unreachable=0    failed=1    skipped=0    rescued=0    ignored=0
1 resposta
cannot create /vagrant/world.txt: Directory nonexistent

tenta rodar um mkdir /vagrant antes do echo hello > /vagrant/world.txt