|
|
@ -75,7 +75,7 @@ class ActionModule(object):
|
|
|
|
new_host.set_variable(k, args[k])
|
|
|
|
new_host.set_variable(k, args[k])
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
groupnames = args.get('groupname', args.get('groups', ''))
|
|
|
|
groupnames = args.get('groupname', args.get('groups', args.get('group', '')))
|
|
|
|
# add it to the group if that was specified
|
|
|
|
# add it to the group if that was specified
|
|
|
|
if groupnames != '':
|
|
|
|
if groupnames != '':
|
|
|
|
for group_name in groupnames.split(","):
|
|
|
|
for group_name in groupnames.split(","):
|
|
|
@ -89,6 +89,10 @@ class ActionModule(object):
|
|
|
|
|
|
|
|
|
|
|
|
result['new_host'] = new_name
|
|
|
|
result['new_host'] = new_name
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# clear pattern caching completely since it's unpredictable what
|
|
|
|
|
|
|
|
# patterns may have referenced the group
|
|
|
|
|
|
|
|
inventory.clear_pattern_cache()
|
|
|
|
|
|
|
|
|
|
|
|
return ReturnData(conn=conn, comm_ok=True, result=result)
|
|
|
|
return ReturnData(conn=conn, comm_ok=True, result=result)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|