mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-22 12:50:22 -07:00
Merge branch 'retf_py' of git://github.com/berendt/ansible into devel
Conflicts: lib/ansible/inventory/vars_plugins/group_vars.py plugins/callbacks/mail.py
This commit is contained in:
commit
8c4161d4a1
21 changed files with 48 additions and 48 deletions
|
@ -86,7 +86,7 @@ class Inventory(object):
|
|||
else:
|
||||
if ":" in x:
|
||||
tokens = x.rsplit(":", 1)
|
||||
# if there is ':' in the address, then this is a ipv6
|
||||
# if there is ':' in the address, then this is an ipv6
|
||||
if ':' in tokens[0]:
|
||||
all.add_host(Host(x))
|
||||
else:
|
||||
|
@ -237,7 +237,7 @@ class Inventory(object):
|
|||
|
||||
def __get_hosts(self, pattern):
|
||||
"""
|
||||
finds hosts that postively match a particular pattern. Does not
|
||||
finds hosts that positively match a particular pattern. Does not
|
||||
take into account negative matches.
|
||||
"""
|
||||
|
||||
|
|
|
@ -28,7 +28,7 @@ formatting hint when the range is expanded. e.g. [001:010] is to be
|
|||
expanded into 001, 002 ...009, 010.
|
||||
|
||||
Note that when beg is specified with left zero padding, then the length of
|
||||
end must be the same as that of beg, else a exception is raised.
|
||||
end must be the same as that of beg, else an exception is raised.
|
||||
'''
|
||||
import string
|
||||
|
||||
|
@ -37,7 +37,7 @@ from ansible import errors
|
|||
def detect_range(line = None):
|
||||
'''
|
||||
A helper function that checks a given host line to see if it contains
|
||||
a range pattern descibed in the docstring above.
|
||||
a range pattern described in the docstring above.
|
||||
|
||||
Returnes True if the given line contains a pattern, else False.
|
||||
'''
|
||||
|
@ -102,7 +102,7 @@ def expand_hostname_range(line = None):
|
|||
if i_beg > i_end:
|
||||
raise errors.AnsibleError("host range format incorrectly specified!")
|
||||
seq = string.ascii_letters[i_beg:i_end+1]
|
||||
except ValueError: # not a alpha range
|
||||
except ValueError: # not an alpha range
|
||||
seq = range(int(beg), int(end)+1, int(step))
|
||||
|
||||
for rseq in seq:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue