mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-07 13:52:54 +00:00
add_hosts.py: Fix add_host does not recognise 'host' alias (#27418)
* add_hosts.py: Fix add_host does not recognise 'host' alias * add_hosts.py: add note in documentation that 'hosts' alias of name parameter is only available on >=2.4
This commit is contained in:
committed by
Brian Coca
parent
e241e15899
commit
7cfd02097c
@@ -46,7 +46,7 @@ class ActionModule(ActionBase):
|
||||
result = super(ActionModule, self).run(tmp, task_vars)
|
||||
|
||||
# Parse out any hostname:port patterns
|
||||
new_name = self._task.args.get('name', self._task.args.get('hostname', None))
|
||||
new_name = self._task.args.get('name', self._task.args.get('hostname', self._task.args.get('host', None)))
|
||||
display.vv("creating host via 'add_host': hostname=%s" % new_name)
|
||||
|
||||
try:
|
||||
|
||||
Reference in New Issue
Block a user