From d1a7fca7f332638646d31a1d4cbc53c41cc6c09b Mon Sep 17 00:00:00 2001 From: willthames Date: Wed, 9 Apr 2014 16:43:55 +1000 Subject: [PATCH] Moved AWS modules over to common module fragments Created common module doc fragment, and applied to all modules that use ec2_connect or connect_to_aws as they definitely share the common doc fragments --- cloud/ec2 | 42 +--------------------------------------- cloud/ec2_ami | 42 +--------------------------------------- cloud/ec2_asg | 14 +------------- cloud/ec2_eip | 42 +--------------------------------------- cloud/ec2_group | 42 +--------------------------------------- cloud/ec2_key | 42 +--------------------------------------- cloud/ec2_lc | 14 +------------- cloud/ec2_metric_alarm | 2 +- cloud/ec2_scaling_policy | 2 +- cloud/ec2_snapshot | 34 +------------------------------- cloud/ec2_tag | 42 +--------------------------------------- cloud/ec2_vol | 34 +------------------------------- 12 files changed, 12 insertions(+), 340 deletions(-) diff --git a/cloud/ec2 b/cloud/ec2 index 999d766c6c1..0752f40fa4b 100644 --- a/cloud/ec2 +++ b/cloud/ec2 @@ -110,24 +110,6 @@ options: - how long to wait for the spot instance request to be fulfilled default: 600 aliases: [] - ec2_url: - description: - - Url to use to connect to EC2 or your Eucalyptus cloud (by default the module will use EC2 endpoints). Must be specified if region is not used. If not set then the value of the EC2_URL environment variable, if any, is used - required: false - default: null - aliases: [] - aws_secret_key: - description: - - AWS secret key. If not set then the value of the AWS_SECRET_KEY environment variable is used. - required: false - default: null - aliases: [ 'ec2_secret_key', 'secret_key' ] - aws_access_key: - description: - - AWS access key. If not set then the value of the AWS_ACCESS_KEY environment variable is used. - required: false - default: null - aliases: [ 'ec2_access_key', 'access_key' ] count: description: - number of instances to launch @@ -237,31 +219,9 @@ options: required: false default: null aliases: [] - validate_certs: - description: - - When set to "no", SSL certificates will not be validated for boto versions >= 2.6.0. - required: false - default: "yes" - 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.6" - security_token: - description: - - security token to authenticate against AWS - required: false - default: null - aliases: [] - version_added: "1.6" -requirements: [ "boto" ] author: Seth Vidal, Tim Gerla, Lester Wade +extends_documentation_fragment: aws ''' EXAMPLES = ''' diff --git a/cloud/ec2_ami b/cloud/ec2_ami index 446c7417e01..3baf70a438f 100644 --- a/cloud/ec2_ami +++ b/cloud/ec2_ami @@ -22,24 +22,6 @@ short_description: create or destroy an image in ec2, return imageid description: - Creates or deletes ec2 images. This module has a dependency on python-boto >= 2.5 options: - ec2_url: - description: - - Url to use to connect to EC2 or your Eucalyptus cloud (by default the module will use EC2 endpoints). Must be specified if region is not used. If not set then the value of the EC2_URL environment variable, if any, is used - required: false - default: null - aliases: [] - aws_secret_key: - description: - - AWS secret key. If not set then the value of the AWS_SECRET_KEY environment variable is used. - required: false - default: null - aliases: [ 'ec2_secret_key', 'secret_key' ] - aws_access_key: - description: - - AWS access key. If not set then the value of the AWS_ACCESS_KEY environment variable is used. - required: false - default: null - aliases: ['ec2_access_key', 'access_key' ] instance_id: description: - instance id of the image to create @@ -101,31 +83,9 @@ options: required: false default: null aliases: [] - validate_certs: - description: - - When set to "no", SSL certificates will not be validated for boto versions >= 2.6.0. - required: false - default: "yes" - 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.6" - security_token: - description: - - security token to authenticate against AWS - required: false - default: null - aliases: [] - version_added: "1.6" -requirements: [ "boto" ] author: Evan Duffield +extends_documentation_fragment: aws ''' # Thank you to iAcquire for sponsoring development of this module. diff --git a/cloud/ec2_asg b/cloud/ec2_asg index 0e43e6b2524..6528d951180 100644 --- a/cloud/ec2_asg +++ b/cloud/ec2_asg @@ -22,7 +22,6 @@ description: - Can create or delete AWS Autoscaling Groups - Works with the ec2_lc module to manage Launch Configurations version_added: "1.6" -requirements: [ "boto" ] author: Gareth Rushgrove options: state: @@ -58,18 +57,6 @@ options: description: - Desired number of instances in group required: false - aws_secret_key: - description: - - AWS secret key. If not set then the value of the AWS_SECRET_KEY environment variable is used. - required: false - default: None - aliases: ['ec2_secret_key', 'secret_key' ] - aws_access_key: - description: - - AWS access key. If not set then the value of the AWS_ACCESS_KEY environment variable is used. - required: false - default: None - aliases: ['ec2_access_key', 'access_key' ] region: description: - The AWS region to use. If not specified then the value of the EC2_REGION environment variable, if any, is used. @@ -80,6 +67,7 @@ options: - List of VPC subnets to use required: false default: None +extends_documentation_fragment: aws """ EXAMPLES = ''' diff --git a/cloud/ec2_eip b/cloud/ec2_eip index 5be83387e07..e1182108097 100644 --- a/cloud/ec2_eip +++ b/cloud/ec2_eip @@ -23,24 +23,6 @@ options: required: false choices: ['present', 'absent'] default: present - ec2_url: - description: - - URL to use to connect to EC2-compatible cloud (by default the module will use EC2 endpoints) - required: false - default: null - aliases: [ EC2_URL ] - ec2_access_key: - description: - - EC2 access key. If not specified then the EC2_ACCESS_KEY environment variable is used. - required: false - default: null - aliases: [ EC2_ACCESS_KEY ] - ec2_secret_key: - description: - - EC2 secret key. If not specified then the EC2_SECRET_KEY environment variable is used. - required: false - default: null - aliases: [ EC2_SECRET_KEY ] region: description: - the EC2 region to use @@ -53,28 +35,6 @@ options: required: false default: false version_added: "1.4" - validate_certs: - description: - - When set to "no", SSL certificates will not be validated for boto versions >= 2.6.0. - required: false - default: "yes" - 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.6" - security_token: - description: - - security token to authenticate against AWS - required: false - default: null - aliases: [] - version_added: "1.6" reuse_existing_ip_allowed: description: - Reuse an EIP that is not associated to an instance (when available), instead of allocating a new one. @@ -82,7 +42,7 @@ options: default: false version_added: "1.6" -requirements: [ "boto" ] +extends_documentation_fragment: aws author: Lorin Hochstein notes: - This module will return C(public_ip) on success, which will contain the diff --git a/cloud/ec2_group b/cloud/ec2_group index 12a49fe0d82..56581ecd778 100644 --- a/cloud/ec2_group +++ b/cloud/ec2_group @@ -37,24 +37,6 @@ options: required: false default: null aliases: [] - ec2_url: - description: - - Url to use to connect to EC2 or your Eucalyptus cloud (by default the module will use EC2 endpoints) - required: false - default: null - aliases: [] - ec2_secret_key: - description: - - EC2 secret key - required: false - default: null - aliases: ['aws_secret_key'] - ec2_access_key: - description: - - EC2 access key - required: false - default: null - aliases: ['aws_access_key'] state: version_added: "1.4" description: @@ -62,30 +44,8 @@ options: required: false default: 'present' aliases: [] - validate_certs: - description: - - When set to "no", SSL certificates will not be validated for boto versions >= 2.6.0. - required: false - default: "yes" - 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.6" - security_token: - description: - - security token to authenticate against AWS - required: false - default: null - aliases: [] - version_added: "1.6" -requirements: [ "boto" ] +extends_documentation_fragment: aws notes: - If a rule declares a group_name and that group doesn't exist, it will be diff --git a/cloud/ec2_key b/cloud/ec2_key index 99ea5bcc3e0..9c8274f764a 100644 --- a/cloud/ec2_key +++ b/cloud/ec2_key @@ -24,52 +24,12 @@ options: required: false default: null aliases: [] - ec2_url: - description: - - Url to use to connect to EC2 or your Eucalyptus cloud (by default the module will use EC2 endpoints) - required: false - default: null - aliases: [] - ec2_secret_key: - description: - - EC2 secret key - required: false - default: null - aliases: ['aws_secret_key', 'secret_key'] - ec2_access_key: - description: - - EC2 access key - required: false - default: null - aliases: ['aws_access_key', 'access_key'] state: description: - create or delete keypair required: false default: 'present' aliases: [] - validate_certs: - description: - - When set to "no", SSL certificates will not be validated for boto versions >= 2.6.0. - required: false - default: "yes" - 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.6" - security_token: - description: - - security token to authenticate against AWS - required: false - default: null - aliases: [] - version_added: "1.6" wait: description: - Wait for the specified action to complete before returning. @@ -85,7 +45,7 @@ options: aliases: [] version_added: "1.6" -requirements: [ "boto" ] +extends_documentation_fragment: aws author: Vincent Viallet ''' diff --git a/cloud/ec2_lc b/cloud/ec2_lc index ff24924aaa6..91905a38894 100644 --- a/cloud/ec2_lc +++ b/cloud/ec2_lc @@ -22,7 +22,6 @@ description: - Can create or delete AwS Autoscaling Configurations - Works with the ec2_asg module to manage Autoscaling Groups version_added: "1.6" -requirements: [ "boto" ] author: Gareth Rushgrove options: state: @@ -46,18 +45,6 @@ options: description: - A list of security groups into which instances should be found required: false - aws_secret_key: - description: - - AWS secret key. If not set then the value of the AWS_SECRET_KEY environment variable is used. - required: false - default: None - aliases: ['ec2_secret_key', 'secret_key' ] - aws_access_key: - description: - - AWS access key. If not set then the value of the AWS_ACCESS_KEY environment variable is used. - required: false - default: None - aliases: ['ec2_access_key', 'access_key' ] region: description: - The AWS region to use. If not specified then the value of the EC2_REGION environment variable, if any, is used. @@ -75,6 +62,7 @@ options: required: false default: null aliases: [] +extends_documentation_fragment: aws """ EXAMPLES = ''' diff --git a/cloud/ec2_metric_alarm b/cloud/ec2_metric_alarm index b9d7173b2f3..4791330dbe2 100644 --- a/cloud/ec2_metric_alarm +++ b/cloud/ec2_metric_alarm @@ -21,7 +21,6 @@ description: - Can create or delete AWS metric alarms - Metrics you wish to alarm on must already exist version_added: "1.6" -requirements: [ "boto" ] author: Zacharie Eakin options: state: @@ -91,6 +90,7 @@ options: description: - A list of the names of action(s) to take when the alarm is in the 'ok' status required: false +extends_documentation_fragment: aws """ EXAMPLES = ''' diff --git a/cloud/ec2_scaling_policy b/cloud/ec2_scaling_policy index f5ad4d3b010..4e66f463063 100755 --- a/cloud/ec2_scaling_policy +++ b/cloud/ec2_scaling_policy @@ -7,7 +7,6 @@ description: - Can create or delete scaling policies for autoscaling groups - Referenced autoscaling groups must already exist version_added: "1.6" -requirements: [ "boto" ] author: Zacharie Eakin options: state: @@ -40,6 +39,7 @@ options: description: - The minimum period of time between which autoscaling actions can take place required: false +extends_documentation_fragment: aws """ EXAMPLES = ''' diff --git a/cloud/ec2_snapshot b/cloud/ec2_snapshot index 075fe143f84..10aba7963c6 100644 --- a/cloud/ec2_snapshot +++ b/cloud/ec2_snapshot @@ -22,24 +22,6 @@ description: - creates an EC2 snapshot from an existing EBS volume version_added: "1.5" options: - ec2_secret_key: - description: - - AWS secret key. If not set then the value of the AWS_SECRET_KEY environment variable is used. - required: false - default: None - aliases: ['aws_secret_key', 'secret_key' ] - ec2_access_key: - description: - - AWS access key. If not set then the value of the AWS_ACCESS_KEY environment variable is used. - required: false - default: None - aliases: ['aws_access_key', 'access_key' ] - ec2_url: - description: - - Url to use to connect to EC2 or your Eucalyptus cloud (by default the module will use EC2 endpoints). Must be specified if region is not used. If not set then the value of the EC2_URL environment variable, if any, is used - required: false - default: null - aliases: [] region: description: - The AWS region to use. If not specified then the value of the EC2_REGION environment variable, if any, is used. @@ -70,23 +52,9 @@ options: 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.6" - security_token: - description: - - security token to authenticate against AWS - required: false - default: null - aliases: [] - version_added: "1.6" -requirements: [ "boto" ] author: Will Thames +extends_documentation_fragment: aws ''' EXAMPLES = ''' diff --git a/cloud/ec2_tag b/cloud/ec2_tag index 92af644933e..6c6eb94d218 100644 --- a/cloud/ec2_tag +++ b/cloud/ec2_tag @@ -41,49 +41,9 @@ options: required: false default: null aliases: ['aws_region', 'ec2_region'] - aws_secret_key: - description: - - AWS secret key. If not set then the value of the AWS_SECRET_KEY environment variable is used. - required: false - default: None - aliases: ['ec2_secret_key', 'secret_key' ] - aws_access_key: - description: - - AWS access key. If not set then the value of the AWS_ACCESS_KEY environment variable is used. - required: false - default: None - aliases: ['ec2_access_key', 'access_key' ] - ec2_url: - description: - - Url to use to connect to EC2 or your Eucalyptus cloud (by default the module will use EC2 endpoints). Must be specified if region is not used. If not set then the value of the EC2_URL environment variable, if any, is used. - required: false - default: null - aliases: [] - validate_certs: - description: - - When set to "no", SSL certificates will not be validated for boto versions >= 2.6.0. - required: false - default: "yes" - 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.6" - security_token: - description: - - security token to authenticate against AWS - required: false - default: null - aliases: [] - version_added: "1.6" -requirements: [ "boto" ] author: Lester Wade +extends_documentation_fragment: aws ''' EXAMPLES = ''' diff --git a/cloud/ec2_vol b/cloud/ec2_vol index 7eb8edec4d5..152094d9b9b 100644 --- a/cloud/ec2_vol +++ b/cloud/ec2_vol @@ -22,24 +22,6 @@ description: - creates an EBS volume and optionally attaches it to an instance. If both an instance ID and a device name is given and the instance has a device at the device name, then no volume is created and no attachment is made. This module has a dependency on python-boto. version_added: "1.1" options: - aws_secret_key: - description: - - AWS secret key. If not set then the value of the AWS_SECRET_KEY environment variable is used. - required: false - default: None - aliases: ['ec2_secret_key', 'secret_key' ] - aws_access_key: - description: - - AWS access key. If not set then the value of the AWS_ACCESS_KEY environment variable is used. - required: false - default: None - aliases: ['ec2_access_key', 'access_key' ] - ec2_url: - description: - - Url to use to connect to EC2 or your Eucalyptus cloud (by default the module will use EC2 endpoints). Must be specified if region is not used. If not set then the value of the EC2_URL environment variable, if any, is used - required: false - default: null - aliases: [] instance: description: - instance ID if you wish to attach the volume. @@ -105,20 +87,6 @@ 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.6" - security_token: - description: - - security token to authenticate against AWS - required: false - default: null - aliases: [] - version_added: "1.6" state: description: - whether to ensure the volume is present or absent @@ -126,8 +94,8 @@ options: default: present choices: ['absent', 'present'] version_added: "1.6" -requirements: [ "boto" ] author: Lester Wade +extends_documentation_fragment: aws ''' EXAMPLES = '''