package - use existing list of package manages from facts (#70920)

pull/70973/head
Sam Doran 4 years ago committed by GitHub
parent 73a9ad9aea
commit a24f51d9e5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -0,0 +1,2 @@
bugfixes:
- package - use list of built in package managers from facts rather than creating a new list

@ -19,6 +19,7 @@ __metaclass__ = type
from ansible.errors import AnsibleAction, AnsibleActionFail from ansible.errors import AnsibleAction, AnsibleActionFail
from ansible.executor.module_common import get_action_args_with_defaults from ansible.executor.module_common import get_action_args_with_defaults
from ansible.module_utils.facts.system.pkg_mgr import PKG_MGRS
from ansible.plugins.action import ActionBase from ansible.plugins.action import ActionBase
from ansible.utils.display import Display from ansible.utils.display import Display
@ -29,8 +30,7 @@ class ActionModule(ActionBase):
TRANSFERS_FILES = False TRANSFERS_FILES = False
BUILTIN_PKG_MGR_MODULES = set(['apk', 'apt', 'dnf', 'homebrew', 'installp', 'macports', 'opkg', 'portage', 'pacman', BUILTIN_PKG_MGR_MODULES = set([manager['name'] for manager in PKG_MGRS])
'pkg5', 'pkgin', 'pkgng', 'sorcery', 'svr4pkg', 'swdepot', 'swupd', 'urpmi', 'xbps', 'yum', 'zypper'])
def run(self, tmp=None, task_vars=None): def run(self, tmp=None, task_vars=None):
''' handler for package operations ''' ''' handler for package operations '''

Loading…
Cancel
Save