--- - name: Verify Middleware Apache configs ansible.builtin.find: path: /apps/GTS recurse: true use_regex: false patterns: - 'httpd.conf' register: find_files - name: Debug find_files ansible.builtin.debug: var: find_files - name: List the Apache configurations found ansible.builtin.debug: msg: "Config found: {{ item['path'] }}" loop: "{{ find_files['files'] }}" loop_control: label: "{{ item['path'] }}" - name: Get a list of Apache processes on the host ansible.builtin.shell: cmd: | set -o pipefail ps -ef | grep -i {{ mw_apache_bin }} | awk '{print $11}' register: apache_processes changed_when: false - name: Debug apache_processes ansible.builtin.debug: msg: "{{ item }}" loop: "{{ apache_processes['stdout_lines'] }}" when: - "'apps' in item" - name: Debug mw_apache_bin ansible.builtin.debug: var: mw_apache_bin