From 38b8d62e68a7e705318312be87b95bd53f8324ed Mon Sep 17 00:00:00 2001 From: Michael Scherer Date: Fri, 8 Dec 2017 18:13:00 +0100 Subject: [PATCH] Add autodetection of atomic as a package manager On Fedora Atomic Host, there is no yum or dnf, but the module ot use to install package should be atomic_container. We verify that this is a Fedora Atomic Host with rpm-ostree, not atomic since atomic can be used on a regular non ostree distribution. --- lib/ansible/module_utils/facts/system/pkg_mgr.py | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/ansible/module_utils/facts/system/pkg_mgr.py b/lib/ansible/module_utils/facts/system/pkg_mgr.py index 502dfe8570a..db18bb0ee5a 100644 --- a/lib/ansible/module_utils/facts/system/pkg_mgr.py +++ b/lib/ansible/module_utils/facts/system/pkg_mgr.py @@ -47,6 +47,7 @@ PKG_MGRS = [{'path': '/usr/bin/yum', 'name': 'yum'}, {'path': '/usr/local/sbin/pkg', 'name': 'pkgng'}, {'path': '/usr/bin/swupd', 'name': 'swupd'}, {'path': '/usr/sbin/sorcery', 'name': 'sorcery'}, + {'path': '/usr/bin/rpm-ostree', 'name': 'atomic_container'}, ]