Hi I am trying to achieve all running processes on our linux machines via ansible and get output in a file along with each host name and processes. I have made below playbook but not getting to the point how to get list of processes for each host one by one and store in a file. Can anyone please help with the code how can I achieve this? I am using with_items with list of hosts which is coming from inventory group hostlist. many thanks
--- - hosts: all gather_facts: false tasks: - name: Get Running Processes command: ps -ef delegate_to: "{{ item }}" run_once: false with_items: - "{{ groups['hostlist'] }}" register: process_list -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving emails from it, send an email to ansible-project+unsubscr...@googlegroups.com. To post to this group, send email to ansible-project@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/34297f23-0ef1-47d1-bb98-2730a9079424%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.