mirror of
https://github.com/ansible/awx.git
synced 2026-03-28 06:15:04 -02:30
Add SUSE, OpenSuse and Debian to scan_packages
Also strip the output of get_distribution() since the suse variants seem to have extra whitespace in the string output.
This commit is contained in:
@@ -71,11 +71,13 @@ def deb_package_list():
|
|||||||
def main():
|
def main():
|
||||||
module = AnsibleModule(
|
module = AnsibleModule(
|
||||||
argument_spec = dict())
|
argument_spec = dict())
|
||||||
|
import os
|
||||||
ans_dist = get_distribution()
|
os.system('echo "%s" > /tmp/foo' % get_distribution())
|
||||||
if ans_dist in ('Centos', 'Centos linux', 'Red hat enterprise linux server', 'Amazon'):
|
ans_dist = get_distribution().strip()
|
||||||
|
if ans_dist in ('Centos', 'Centos linux', 'Red hat enterprise linux server', 'Amazon', 'Suse linux enterprise server', 'Opensuse'):
|
||||||
|
os.system('echo "in rpm_package_list for %s" >> /tmp/foo' % ans_dist)
|
||||||
packages = rpm_package_list()
|
packages = rpm_package_list()
|
||||||
elif ans_dist in ('Ubuntu'):
|
elif ans_dist in ('Ubuntu', 'Debian'):
|
||||||
packages = deb_package_list()
|
packages = deb_package_list()
|
||||||
else:
|
else:
|
||||||
packages = None
|
packages = None
|
||||||
|
|||||||
Reference in New Issue
Block a user