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 ffdfd
• 5,550 points
2,564 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,300 points

edited Jul 13, 2018 by ajs3033

Related Questions In Ansible

0 votes
1 answer

How to list down all the hosts in Ansible?

Hi@akhtar, You can use the option --list-hosts. It will ...READ MORE

answered Jul 28, 2020 in Ansible by MD
• 95,460 points
48,535 views
0 votes
1 answer

How to list down all the roles in Ansible?

Hi@akhtar, Ansible role is a part of ansible-galaxy. ...READ MORE

answered Aug 20, 2020 in Ansible by MD
• 95,460 points
8,181 views
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 31, 2019 in Ansible by Mahir
6,147 views
0 votes
1 answer
+1 vote
1 answer
+15 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 27, 2018 in DevOps & Agile by DragonLord999
• 8,450 points
4,062 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,300 points
5,626 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,300 points
6,551 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP