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,530 points
71 views

1 answer to this question.

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,280 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
313 views
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer
+13 votes
2 answers

Git management technique when there are multiple customers and need multiple customization?

Consider this - In 'extended' Git-Flow, (Git-Multi-Flow, ...READ MORE

answered Mar 26, 2018 in DevOps & Agile by DragonLord999
• 8,380 points
177 views
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,280 points
774 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,280 points
721 views