title: In Ansible, how do I check if a value is in one of the elements in an array?
body: <p>I set a register variable that ultimately has this value:</p>
  
  <pre><code>ok: [10.xx.xx.xx] =&gt; {
      "yum_sec_upd.stdout_lines": [
          "Loaded plugins: fastestmirror", 
          "Loading mirror speeds from cached hostfile", 
          " * base: mirrors.usinternet.com", 
          " * epel: mirror.steadfast.net", 
          " * extras: mirror.lax.hugeserver.com", 
          " * updates: centos.mirrors.tds.net", 
          "CESA_2017__0086 Important/Sec. kernel-3.10.0-514.6.1.el7.x86_64", 
          "CESA_2017__0086 Important/Sec. kernel-tools-3.10.0-514.6.1.el7.x86_64", 
          "CESA_2017__0086 Important/Sec. kernel-tools-libs-3.10.0-514.6.1.el7.x86_64", 
          "CESA_2017__0086 Important/Sec. python-perf-3.10.0-514.6.1.el7.x86_64", 
          "updateinfo list done"
      ]
  }
  </code></pre>
  
  <p>How do I check if the string "Sec." is present in the yum_sec_upd.stdout_lines array of strings? I want to do this</p>
  
  <pre><code>- name: Send mail for security updates
    mail: # mail parms here
    when: "'Sec.' in yum_sec_upd.stdout_lines[]"
  </code></pre>