0

I am running the ansible playbook usually after creation of machines using Terraform, sometimes when ansible try to connecting new machine that creates at the same time and machine is not available yet, the ansible flow failed , in addition ansible playbook created main.retry file, do you have a suggestion what should I do when I got those errors? How can I retry that run? I also added to ansible tasks retries label but I think it wasn't working, BTW it can happen also on other tasks,for example copy files from S3

Thanks Eyal

EyalChn
  • 81
  • 1
  • 10
  • I suggest you simply read the output of the command when your playbook fails and use the recommendation given to you, i.e. "to retry, use `--limit @path/to/file.retry`" – Zeitounator Oct 22 '19 at 18:51
  • Thanks for your comments, but i got >> --limit: command not found , i also try to use >> ansible-playbook -i main.retry main.yml --limit="all" , but got : [WARNING]: Could not match supplied host pattern, ignoring: agents PLAY [agents] ************************************************************************************************************************************** skipping: no hosts matched PLAY RECAP ********************** – EyalChn Oct 23 '19 at 05:25
  • `--limit` is not a command but an option to add to your previous `ansible-playbook` command, e.g. `ansible-playbook -i paths/to/myinventory.ini my_playbook.yml --limit @path/to/file.retry` – Zeitounator Oct 24 '19 at 12:06

0 Answers0