diff --git a/cloud/rax b/cloud/rax index 46302bc851a..0c8e64a4b74 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 b4cb0c978ff..9c42bb30a82 100644 --- a/cloud/rax_facts +++ b/cloud/rax_facts @@ -112,7 +112,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: