Merge pull request #2799 from j2sol/flavor-int
Fix instance idempotence
This commit is contained in:
commit
fcc2a753b7
1 changed files with 1 additions and 2 deletions
|
@ -124,7 +124,7 @@ def cloudservers(module, state, name, flavor, image, meta, key_name, files,
|
||||||
for server in pyrax.cloudservers.list():
|
for server in pyrax.cloudservers.list():
|
||||||
if name != server.name:
|
if name != server.name:
|
||||||
continue
|
continue
|
||||||
if flavor != server.flavor['id']:
|
if int(flavor) != int(server.flavor['id']):
|
||||||
continue
|
continue
|
||||||
if image != server.image['id']:
|
if image != server.image['id']:
|
||||||
continue
|
continue
|
||||||
|
@ -246,7 +246,6 @@ def main():
|
||||||
module.fail_json(msg = 'Unable to load %s' % e.message)
|
module.fail_json(msg = 'Unable to load %s' % e.message)
|
||||||
|
|
||||||
# setup the auth
|
# setup the auth
|
||||||
sys.stderr.write('region is %s' % region)
|
|
||||||
try:
|
try:
|
||||||
pyrax.set_credential_file(creds_file, region=region)
|
pyrax.set_credential_file(creds_file, region=region)
|
||||||
except Exception, e:
|
except Exception, e:
|
||||||
|
|
Loading…
Reference in a new issue