mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-29 08:01:24 -07:00
now host list removes trailing/leading spaces
othewise hostnames were just 'fun'
This commit is contained in:
parent
b9688c5497
commit
a54666d31e
2 changed files with 2 additions and 0 deletions
|
@ -61,6 +61,7 @@ class InventoryModule(BaseInventoryPlugin):
|
||||||
|
|
||||||
try:
|
try:
|
||||||
for h in host_list.split(','):
|
for h in host_list.split(','):
|
||||||
|
h = h.strip()
|
||||||
if h:
|
if h:
|
||||||
try:
|
try:
|
||||||
(hostnames, port) = self._expand_hostpattern(h)
|
(hostnames, port) = self._expand_hostpattern(h)
|
||||||
|
|
|
@ -64,6 +64,7 @@ class InventoryModule(BaseInventoryPlugin):
|
||||||
|
|
||||||
try:
|
try:
|
||||||
for h in host_list.split(','):
|
for h in host_list.split(','):
|
||||||
|
h = h.strip()
|
||||||
if h:
|
if h:
|
||||||
try:
|
try:
|
||||||
(host, port) = parse_address(h, allow_ranges=False)
|
(host, port) = parse_address(h, allow_ranges=False)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue