diff --git a/salt/modules/pacman.py b/salt/modules/pacman.py index b0cbe4b2f9..5b9574e8b9 100644 --- a/salt/modules/pacman.py +++ b/salt/modules/pacman.py @@ -21,6 +21,19 @@ def _list_removed(old, new): pkgs.append(pkg) return pkgs +def is_installed(pkg): + ''' + Returns a bool if the package is installed or not + + CLI Example: + salt '*' pkg.is_installed + ''' + pkgs = list_pkgs() + if pkgs.has_key(name): + return pkgs[name] + else: + return '' + def list_pkgs(): ''' List the packages currently installed in a dict: