I am trying to extract the catalina home,catalina base and logging properties from the ps aux | grep tomcat command, if multiple tomcat instances are running i would like to set them in a list
users:[useraA, userB]
catalinahome:[catalinahome1, catalinahome2]
I tried
- name: Create dictionary for tomusers
set_fact:
tom_users: “{{tom_users | default([]) + [ item.split()[0]] }}”
loop: “{{ dataresult }}” — stdout_lines
for catalina home and base
i am unable to retrieve the data please assist
here is what i tried
- name: Create dictionary for java.util.logging.config.file
set_fact:
log_propss: “{{ item.split()[8] | item.0.split(‘=’) }}”
loop: “{{ dataresult }}”
when: tomcat_process_cmd.stdout | regex_search(‘logging.config.file’)