diff --git a/cloud/rax b/cloud/rax index dc4b2fa9b62..230f80df5e2 100644 --- a/cloud/rax +++ b/cloud/rax @@ -576,7 +576,7 @@ def cloudservers(module, state, name, flavor, image, meta, key_name, files, names = [name] * count else: search_opts = { - 'name': name, + 'name': '^%s$' % name, 'image': image, 'flavor': flavor } @@ -612,7 +612,7 @@ def cloudservers(module, state, name, flavor, image, meta, key_name, files, module.fail_json(msg='%s is required for the "rax" ' 'module' % arg) search_opts = { - 'name': name, + 'name': '^%s$' % name, 'image': image, 'flavor': flavor } diff --git a/cloud/rax_facts b/cloud/rax_facts index d1cd3056e86..ca117a665a1 100644 --- a/cloud/rax_facts +++ b/cloud/rax_facts @@ -142,7 +142,7 @@ def rax_facts(module, address, name, server_id): search_opts = {} if name: - search_opts = dict(name=name) + search_opts = dict(name='^%s$' % name) try: servers = cs.servers.list(search_opts=search_opts) except Exception, e: