How to Pause an Ansible Playbook on command line w

2019-03-06 05:08发布

Our team have been trying to develop some GUI for the ansible execution and I wanted to know if there is some way to pause the execution of the playbook midway with just command line argument. I am familiar with the Pause option but that needs to be added in the YAML, we don't want that. I am also familiar with the --step argument passed on the CLI, that's close to what we want but not specifically.

Thanks.

2条回答
smile是对你的礼貌
2楼-- · 2019-03-06 05:49

While the playbook is running you can press ctrl + s to freeze the console and then ctrl + q to resume it.

查看更多
对你真心纯属浪费
3楼-- · 2019-03-06 05:58

I believe that you have found the only two options that would stop a playbook mid-play (pause and --step). As you're probably aware, Ansible is designed to run roles/playbooks start to finish without user intervention. Anything that allows you to stop mid-execution is really just for debugging.

What are you trying to accomplish by building a custom GUI? Have you looked into AWX?

查看更多
登录 后发表回答