title: How to use Ansible wait_for to check a command status with multiple lines?
body: <p>Ansible v2.4.0.0</p>
  
  <p>I'm installing Gitlab-CE where I run the following in an Ansible task. As you can see, some of the processes are down, but they eventually come up.</p>
  
  <pre><code># gitlab-ctl status
  run: gitlab-workhorse: 0s, normally up
  run: logrotate: 1s, normally up
  down: nginx: 0s, normally up
  down: postgresql: 1s, normally up
  run: redis: 0s, normally up
  run: sidekiq: 0s, normally up
  run: unicorn: 0s, normally up
  </code></pre>
  
  <p>How can I write an Ansible wait_for task to check when all the services are in the run state? IOW I only want to proceed to the next task when I see this</p>
  
  <pre><code># gitlab-ctl status
  run: gitlab-workhorse: 0s, normally up
  run: logrotate: 1s, normally up
  run: nginx: 0s, normally up
  run: postgresql: 1s, normally up
  run: redis: 0s, normally up
  run: sidekiq: 0s, normally up
  run: unicorn: 0s, normally up
  </code></pre>