Ansible: List all installed Apps in RedHat

0 votes

I am trying to get a list of all the installed applications on my redhat 7  machine but when I run service --list-all it doesn't respond. Is there any way using ansible to list all the apps.

I tried running this ad-hoc command in ansible:

ansible all -m raw -a "systemctl list-unit-files | grep enabled"
Jul 13, 2018 in Ansible by Atul
• 5,470 points
38 views

1 answer to this question.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
0 votes

Try this to get a list of all the installed apps:

- name: yum_command 
  yum:
    list=installed
  register: yum_packages

- debug:
    var: yum_packages
answered Jul 13, 2018 by ajs3033
• 7,000 points

edited Jul 13, 2018 by ajs3033

Related Questions In Ansible

0 votes
1 answer

How do I get a list of all Ansible variables?

Ansible by default gathers facts about machines ...READ MORE

answered Jan 30 in Ansible by Mahir
92 views
0 votes
1 answer
0 votes
1 answer

How do I execute a shell script and then use the result in ansible

This can work out for you: - name: ...READ MORE

answered Apr 11, 2018 in Ansible by shubham
• 6,480 points
206 views
0 votes
1 answer
+13 votes
2 answers
0 votes
1 answer

When conditional not working in Ansible

Your identation is wrong and when is ...READ MORE

answered Apr 27, 2018 in Ansible by ajs3033
• 7,000 points
460 views
0 votes
1 answer

Ansible: setting profile source in ansible.config

Try and add path in .bashrc or ...READ MORE

answered Jul 10, 2018 in Ansible by ajs3033
• 7,000 points
336 views

© 2018 Brain4ce Education Solutions Pvt. Ltd. All rights Reserved.
"PMP®","PMI®", "PMI-ACP®" and "PMBOK®" are registered marks of the Project Management Institute, Inc. MongoDB®, Mongo and the leaf logo are the registered trademarks of MongoDB, Inc.