Work to allow security tokens and profiles to work with Ansible
Allow security tokens and profiles to be used as arguments to the 'common' ec2 modules Mostly refactoring to provide two new methods, `get_aws_connection_info`, which results in a dict that can be passed through to the boto `connect_to_region` calls, and `connect_to_aws` that can pass that dict through to the `connect_to_region` method of the appropriate module. Tidied up some variable names Works around boto/boto#2100 profiles don't work with boto < 2.24, but this detects for that and fails with an appropriate message. It is designed to work if profile is not passed but boto < 2.24 is installed. Modifications to allow empty aws auth variables to be passed (this is useful if wanting to have the keys as an optional parameter in ec2 calls - if set, use this value, if not set, use boto config or env variables) Reworked validate_certs improvements to work with refactoring Added documentation for profile and security_token to affected modules
This commit is contained in:
parent
b105942654
commit
7d0e161662
8 changed files with 115 additions and 2 deletions
14
cloud/ec2
14
cloud/ec2
|
@ -220,6 +220,20 @@ options:
|
|||
choices: ["yes", "no"]
|
||||
aliases: []
|
||||
version_added: "1.5"
|
||||
profile:
|
||||
description:
|
||||
- uses a boto profile. Only works with boto >= 2.24.0
|
||||
required: false
|
||||
default: null
|
||||
aliases: []
|
||||
version_added: "1.5"
|
||||
security_token:
|
||||
description:
|
||||
- security token to authenticate against AWS
|
||||
required: false
|
||||
default: null
|
||||
aliases: []
|
||||
version_added: "1.5"
|
||||
|
||||
requirements: [ "boto" ]
|
||||
author: Seth Vidal, Tim Gerla, Lester Wade
|
||||
|
|
|
@ -109,6 +109,20 @@ options:
|
|||
choices: ["yes", "no"]
|
||||
aliases: []
|
||||
version_added: "1.5"
|
||||
profile:
|
||||
description:
|
||||
- uses a boto profile. Only works with boto >= 2.24.0
|
||||
required: false
|
||||
default: null
|
||||
aliases: []
|
||||
version_added: "1.5"
|
||||
security_token:
|
||||
description:
|
||||
- security token to authenticate against AWS
|
||||
required: false
|
||||
default: null
|
||||
aliases: []
|
||||
version_added: "1.5"
|
||||
|
||||
requirements: [ "boto" ]
|
||||
author: Evan Duffield <eduffield@iacquire.com>
|
||||
|
|
|
@ -61,6 +61,20 @@ options:
|
|||
choices: ["yes", "no"]
|
||||
aliases: []
|
||||
version_added: "1.5"
|
||||
profile:
|
||||
description:
|
||||
- uses a boto profile. Only works with boto >= 2.24.0
|
||||
required: false
|
||||
default: null
|
||||
aliases: []
|
||||
version_added: "1.5"
|
||||
security_token:
|
||||
description:
|
||||
- security token to authenticate against AWS
|
||||
required: false
|
||||
default: null
|
||||
aliases: []
|
||||
version_added: "1.5"
|
||||
|
||||
requirements: [ "boto" ]
|
||||
author: Lorin Hochstein <lorin@nimbisservices.com>
|
||||
|
|
|
@ -65,6 +65,20 @@ options:
|
|||
choices: ["yes", "no"]
|
||||
aliases: []
|
||||
version_added: "1.5"
|
||||
profile:
|
||||
description:
|
||||
- uses a boto profile. Only works with boto >= 2.24.0
|
||||
required: false
|
||||
default: null
|
||||
aliases: []
|
||||
version_added: "1.5"
|
||||
security_token:
|
||||
description:
|
||||
- security token to authenticate against AWS
|
||||
required: false
|
||||
default: null
|
||||
aliases: []
|
||||
version_added: "1.5"
|
||||
|
||||
requirements: [ "boto" ]
|
||||
'''
|
||||
|
|
|
@ -56,6 +56,20 @@ options:
|
|||
choices: ["yes", "no"]
|
||||
aliases: []
|
||||
version_added: "1.5"
|
||||
profile:
|
||||
description:
|
||||
- uses a boto profile. Only works with boto >= 2.24.0
|
||||
required: false
|
||||
default: null
|
||||
aliases: []
|
||||
version_added: "1.5"
|
||||
security_token:
|
||||
description:
|
||||
- security token to authenticate against AWS
|
||||
required: false
|
||||
default: null
|
||||
aliases: []
|
||||
version_added: "1.5"
|
||||
|
||||
requirements: [ "boto" ]
|
||||
author: Vincent Viallet
|
||||
|
|
|
@ -59,17 +59,32 @@ options:
|
|||
default: null
|
||||
aliases: []
|
||||
instance_id:
|
||||
description:
|
||||
description:
|
||||
- instance that has a the required volume to snapshot mounted
|
||||
required: false
|
||||
default: null
|
||||
aliases: []
|
||||
device_name:
|
||||
description:
|
||||
description:
|
||||
- device name of a mounted volume to be snapshotted
|
||||
required: false
|
||||
default: null
|
||||
aliases: []
|
||||
profile:
|
||||
description:
|
||||
- uses a boto profile. Only works with boto >= 2.24.0
|
||||
required: false
|
||||
default: null
|
||||
aliases: []
|
||||
version_added: "1.5"
|
||||
security_token:
|
||||
description:
|
||||
- security token to authenticate against AWS
|
||||
required: false
|
||||
default: null
|
||||
aliases: []
|
||||
version_added: "1.5"
|
||||
|
||||
requirements: [ "boto" ]
|
||||
author: Will Thames
|
||||
'''
|
||||
|
|
|
@ -67,6 +67,20 @@ options:
|
|||
choices: ["yes", "no"]
|
||||
aliases: []
|
||||
version_added: "1.5"
|
||||
profile:
|
||||
description:
|
||||
- uses a boto profile. Only works with boto >= 2.24.0
|
||||
required: false
|
||||
default: null
|
||||
aliases: []
|
||||
version_added: "1.5"
|
||||
security_token:
|
||||
description:
|
||||
- security token to authenticate against AWS
|
||||
required: false
|
||||
default: null
|
||||
aliases: []
|
||||
version_added: "1.5"
|
||||
|
||||
requirements: [ "boto" ]
|
||||
author: Lester Wade
|
||||
|
|
|
@ -90,6 +90,20 @@ options:
|
|||
choices: ["yes", "no"]
|
||||
aliases: []
|
||||
version_added: "1.5"
|
||||
profile:
|
||||
description:
|
||||
- uses a boto profile. Only works with boto >= 2.24.0
|
||||
required: false
|
||||
default: null
|
||||
aliases: []
|
||||
version_added: "1.5"
|
||||
security_token:
|
||||
description:
|
||||
- security token to authenticate against AWS
|
||||
required: false
|
||||
default: null
|
||||
aliases: []
|
||||
version_added: "1.5"
|
||||
|
||||
requirements: [ "boto" ]
|
||||
author: Lester Wade
|
||||
|
|
Loading…
Reference in a new issue