mirror of
https://github.com/ansible/awx.git
synced 2026-03-16 00:17:29 -02:30
clear insights system id if not found
* Host previously found to have an insights system id that then later are found to not have an insights system id, have their system id cleared.
This commit is contained in:
@@ -52,16 +52,13 @@ def main():
|
||||
|
||||
system_uuid = get_system_uuid(INSIGHTS_SYSTEM_ID_FILE)
|
||||
|
||||
if system_uuid is not None:
|
||||
results = {
|
||||
'ansible_facts': {
|
||||
'insights': {
|
||||
'system_id': system_uuid
|
||||
}
|
||||
results = {
|
||||
'ansible_facts': {
|
||||
'insights': {
|
||||
'system_id': system_uuid
|
||||
}
|
||||
}
|
||||
else:
|
||||
results = dict(skipped=True, msg="Insights system id not found")
|
||||
}
|
||||
module.exit_json(**results)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user