mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 13:22:48 +00:00
Merge pull request #3343 from j2sol/add_host_changed
add_host should not be a changed action
This commit is contained in:
@@ -46,7 +46,7 @@ class ActionModule(object):
|
||||
if not 'hostname' in args and not 'name' in args:
|
||||
raise ae("'name' is a required argument.")
|
||||
|
||||
result = {'changed': True}
|
||||
result = {}
|
||||
|
||||
# Parse out any hostname:port patterns
|
||||
new_name = args.get('name', args.get('hostname', None))
|
||||
@@ -69,7 +69,6 @@ class ActionModule(object):
|
||||
# add the new host to the 'all' group
|
||||
allgroup = inventory.get_group('all')
|
||||
allgroup.add_host(new_host)
|
||||
result['changed'] = True
|
||||
|
||||
groupnames = args.get('groupname', args.get('groups', ''))
|
||||
# add it to the group if that was specified
|
||||
|
||||
Reference in New Issue
Block a user