FreeKB - until module (loop)
Ansible - until module (loop)

This assumes you have installed Ansible, are familiar with the ansible-playbook command and have created a playbook.

In this example, the ps command will be executed once every 2 seconds until string "Hello World" is found in the stdout, a maximum of 10 times.

- shell: "ps -ef | grep foo | wc -l"
  register: result
  until: "result.stdout.find('Hello World') != -1"
  retries: 10
  delay: 2


Add a Comment

We will never share your name or email with anyone. Enter your email if you would like to be notified when we respond to your comment.

Please enter c5723 in the box below so that we can be sure you are a human.