updated host gropups and playbook
This commit is contained in:
+3
-1
@@ -37,9 +37,10 @@ def get_inventory_raw():
|
||||
|
||||
@ansible_bp.route('/inventory/sync', methods=['POST'])
|
||||
def sync_inventory():
|
||||
"""Sync all active app devices into monitoring_devices inventory group"""
|
||||
"""Sync all active app devices into monitoring_devices and wmt_clients inventory groups"""
|
||||
try:
|
||||
result = ansible_service.sync_devices_to_inventory()
|
||||
ansible_service.sync_wmt_devices_to_inventory()
|
||||
status = 200 if result.get('success') else 400
|
||||
return jsonify(result), status
|
||||
except Exception as e:
|
||||
@@ -116,6 +117,7 @@ def refresh_inventory():
|
||||
"""Refresh Ansible inventory from database (legacy alias for /sync)"""
|
||||
try:
|
||||
result = ansible_service.sync_devices_to_inventory()
|
||||
ansible_service.sync_wmt_devices_to_inventory()
|
||||
return jsonify(result), 200 if result.get('success') else 400
|
||||
except Exception as e:
|
||||
logging.error(f"Error refreshing inventory: {e}")
|
||||
|
||||
Reference in New Issue
Block a user