mirror of
https://github.com/ansible/awx.git
synced 2026-05-01 22:55:28 -02:30
collect isolated capacity using a cache plugin, not stdout parsing
reading capacity values using the jsonfile cache plugin is more robust in scenarios where ansible-playbook may print non-JSON output (such as -vvv or when a custom callback plugin like timer is enabled)
This commit is contained in:
@@ -62,7 +62,12 @@ def main():
|
||||
|
||||
# Module never results in a change
|
||||
module.exit_json(changed=False, capacity_cpu=capacity_cpu,
|
||||
capacity_mem=capacity_mem, version=version)
|
||||
capacity_mem=capacity_mem, version=version,
|
||||
ansible_facts=dict(
|
||||
awx_capacity_cpu=capacity_cpu,
|
||||
awx_capacity_mem=capacity_mem,
|
||||
awx_capacity_version=version
|
||||
))
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
||||
Reference in New Issue
Block a user