title: Finding all CICS regions containing a program through Ansible
body: <p>I'm using the <a href="https://galaxy.ansible.com/ibm/ibm_zos_cics" rel="nofollow noreferrer">IBM z/OS CICS collection</a> for Ansible. I need to be able to find all CICS regions that contain a particular program, and automate that on a regular basis.</p>
  <p>I have CMCI set up and have tested that. I can also get all programs like this:</p>
  <pre class="lang-yaml prettyprint-override"><code>  tasks:
      - name: 'Get all programs'
        delegate_to: 'localhost'
        ibm.ibm_zos_cics.cmci_get:
          type: 'CICSProgram'
          scope: [redacted]
  </code></pre>
  <p>I'm not quite sure how I should filter the programs or how I should map the result into the CICS region name, and return it as a comma-separated list.</p>