mirror of
https://github.com/ansible/awx.git
synced 2026-03-07 19:51:08 -03:30
Merge branch 'release_2.4.2' into devel
* release_2.4.2: (23 commits) Updating 2.4.2 changelogs fix the connection check fix more robust check added to mongo db connection Adding a body to our OPTIONS requests fixes 415 error responses in IE11 and Edge. Don't hard-fail if default isn't defined on survey fixed custom login info bug Allow an org admin to delete project updates Disable elasticache instance gathering for aws Fix DEB builds by adding 2.4.2 to reprepro conf When the panel lists were consolidated down the list name was changed to 'all_jobs.' When a job is clicked from the activity stream it should show the job list filtered down by ID. Rolled back job url change track modules on system tracking page by index correct spelling of consisting in help text Fixing up flake8 The "job" href links in the activity stream don't point to the job details page. This is an update to the jobs href to point to /#/jobs/(job.id). Wrapped the SourceChange call in a function so that it can be called without clearing the credential. This fixes a bug where the credential was not showing up in the initial edit dialog even though the data was sent properly via the API. Revert change to Makefile, which was causing old .deb versions to be dropped from the repo Refactor scan_packages for os detection Remove stray debugging lines Add SUSE, OpenSuse and Debian to scan_packages ...
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
import os
|
||||
from ansible.module_utils.basic import * # noqa
|
||||
|
||||
DOCUMENTATION = '''
|
||||
@@ -70,16 +69,20 @@ def deb_package_list():
|
||||
|
||||
def main():
|
||||
module = AnsibleModule(
|
||||
argument_spec = dict())
|
||||
|
||||
packages = []
|
||||
# TODO: module_utils/basic.py in ansible contains get_distribution() and get_distribution_version()
|
||||
# which can be used here and is accessible by this script instead of this basic detector.
|
||||
if os.path.exists("/etc/redhat-release"):
|
||||
argument_spec = dict(os_family=dict(required=True))
|
||||
)
|
||||
ans_os = module.params['os_family']
|
||||
if ans_os in ('RedHat', 'Suse', 'openSUSE Leap'):
|
||||
packages = rpm_package_list()
|
||||
elif os.path.exists("/etc/os-release"):
|
||||
elif ans_os == 'Debian':
|
||||
packages = deb_package_list()
|
||||
results = dict(ansible_facts=dict(packages=packages))
|
||||
else:
|
||||
packages = None
|
||||
|
||||
if packages is not None:
|
||||
results = dict(ansible_facts=dict(packages=packages))
|
||||
else:
|
||||
results = dict(skipped=True, msg="Unsupported Distribution")
|
||||
module.exit_json(**results)
|
||||
|
||||
main()
|
||||
|
||||
Reference in New Issue
Block a user