Reputation: 10260
If I start managing a relatively unknown machine, what is the easiest/best way with Ansible and/or Bash or Python to quickly find out what things are installed and what versions?
I'd love to know a generic answer but my two systems of most interest at the moment are RHEL and Mac OSX.
thank you! ps This SO post only describes how to list what is installed by ansible, ie after I would have taken over. How to check what installed by Ansible?
Upvotes: 0
Views: 466
Reputation: 80992
For RedHat (and derivatives) the list of installed packages is available via rpm -qa
(you probably want to add | sort
to that for sanity purposes).
For Debian (and derivatives) the list of installed packages is available via dpkg -l
.
Those only list package installed software. Anything compiled/installed manually will not be in that list and there isn't an easy way to get a list of what those things might be (though looking in /usr/local
and /opt
are good places to start).
I don't know of a way to get that sort of list for OS X. Though I imagine the App Store might be a place to start. The Applications folder another.
For brew
on OS X
the list of installed packages is available via brew list
.
For macports
on OS X
the list of installed packages is available via port installed
.
Upvotes: 1