title: Ansible: Using item(with_items) in changed_when statement
body: <p>I'm using <code>with_items</code> iterator to execute command: <code>brew services stop {{ item }}</code>. </p>
  
  <p>To handle errors I'd like to use <code>changed_when</code> and use <code>item</code> value in it.</p>
  
  <pre><code>command: brew services stop {{ item }}
    register: stop_services
    changed_when:
     - "'Error: Service `{{ item }}` is not started.' not in stop_services.stderr"
    with_items:
     - memcached
     - kafka
  </code></pre>
  
  <p>If service is not started, I get following error</p>
  
  <blockquote>
    <p>failed: [127.0.0.1] (item=memcached) => {"changed": false, "cmd": ["brew", "services", "stop", "memcached"], "delta": "0:00:00.464519", "end": "2016-12-29 18:02:37.795973", "failed": true, "item": "memcached", "rc": 1, "start": "2016-12-29 18:02:37.331454", "stderr": "Error: Service <code>memcached</code> is not started.", "stdout": "", "stdout_lines": [], "warnings": []}</p>
  </blockquote>
  
  <p>But <code>changed_when</code> statement is ignored. </p>
  
  <p>Is it possible to inject <code>item</code> into <code>changed_when</code> statement?</p>
  
  <p>Ansible version: 2.2</p>