Fix regex match, the printf match should work with 0 or more numeric padding characters, not 1 or more
This commit is contained in:
parent
58573e37c7
commit
ccbed7bb55
1 changed files with 2 additions and 2 deletions
|
@ -464,7 +464,7 @@ def cloudservers(module, state, name, flavor, image, meta, key_name, files,
|
|||
else:
|
||||
module.fail_json(msg=e.message)
|
||||
|
||||
pattern = re.sub(r'%\d+[sd]', r'(\d+)', name)
|
||||
pattern = re.sub(r'%\d*[sd]', r'(\d+)', name)
|
||||
for server in cs.servers.list():
|
||||
if server.metadata.get('group') == group:
|
||||
servers.append(server)
|
||||
|
@ -525,7 +525,7 @@ def cloudservers(module, state, name, flavor, image, meta, key_name, files,
|
|||
else:
|
||||
module.fail_json(msg=e.message)
|
||||
|
||||
pattern = re.sub(r'%\d+[sd]', r'(\d+)', name)
|
||||
pattern = re.sub(r'%\d*[sd]', r'(\d+)', name)
|
||||
for server in cs.servers.list():
|
||||
if server.metadata.get('group') == group:
|
||||
servers.append(server)
|
||||
|
|
Loading…
Reference in a new issue