Rename ssm_parameter_store module and ssm lookup to be prefixed with aws (#31662)

This commit is contained in:
Ryan Brown 2017-10-12 23:52:10 -04:00 committed by Will Thames
parent f2fed10ad8
commit e0c2b6bbb4
3 changed files with 21 additions and 40 deletions

View file

@ -27,9 +27,14 @@ Ansible Changes By Release
`ansible_diff_mode`, `ansible_inventory_sources`, `ansible_limit`, `ansible_run_tags` , `ansible_forks` and `ansible_skip_tags` `ansible_diff_mode`, `ansible_inventory_sources`, `ansible_limit`, `ansible_run_tags` , `ansible_forks` and `ansible_skip_tags`
* Updated the bundled copy of the six library to 1.11.0 * Updated the bundled copy of the six library to 1.11.0
* Added support to `become` `NT AUTHORITY\System`, `NT AUTHORITY\LocalService`, and `NT AUTHORITY\NetworkService` on Windows hosts * Added support to `become` `NT AUTHORITY\System`, `NT AUTHORITY\LocalService`, and `NT AUTHORITY\NetworkService` on Windows hosts
* Added `aws_ssm` lookup plugin
### New Modules ### New Modules
#### Cloud
* aws_ssm_parameter_store
#### Windows #### Windows
* win_scheduled_task_stat * win_scheduled_task_stat

View file

@ -1,25 +1,14 @@
#!/usr/bin/python #!/usr/bin/python
# This file is part of Ansible # Copyright: (c) 2017, Ansible Project
# # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Ansible is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
ANSIBLE_METADATA = {'status': ['preview'], ANSIBLE_METADATA = {'status': ['preview'],
'supported_by': 'community', 'supported_by': 'community',
'metadata_version': '1.1'} 'metadata_version': '1.1'}
DOCUMENTATION = ''' DOCUMENTATION = '''
--- ---
module: ssm_parameter_store module: aws_ssm_parameter_store
short_description: Manage key-value pairs in aws parameter store. short_description: Manage key-value pairs in aws parameter store.
description: description:
- Manage key-value pairs in aws parameter store. - Manage key-value pairs in aws parameter store.
@ -78,25 +67,25 @@ requirements: [ botocore, boto3 ]
EXAMPLES = ''' EXAMPLES = '''
- name: Create or update key/value pair in aws parameter store - name: Create or update key/value pair in aws parameter store
ssm_parameter_store: aws_ssm_parameter_store:
name: "Hello" name: "Hello"
description: "This is your first key" description: "This is your first key"
value: "World" value: "World"
- name: Delete the key - name: Delete the key
ssm_parameter_store: aws_ssm_parameter_store:
name: "Hello" name: "Hello"
state: absent state: absent
- name: Create or update secure key/value pair with default kms key (aws/ssm) - name: Create or update secure key/value pair with default kms key (aws/ssm)
ssm_parameter_store: aws_ssm_parameter_store:
name: "Hello" name: "Hello"
description: "This is your first key" description: "This is your first key"
string_type: "SecureString" string_type: "SecureString"
value: "World" value: "World"
- name: Create or update secure key/value pair with nominated kms key - name: Create or update secure key/value pair with nominated kms key
ssm_parameter_store: aws_ssm_parameter_store:
name: "Hello" name: "Hello"
description: "This is your first key" description: "This is your first key"
string_type: "SecureString" string_type: "SecureString"

View file

@ -1,19 +1,6 @@
# (c) 2016, Bill Wang <ozbillwang(at)gmail.com> # (c) 2016, Bill Wang <ozbillwang(at)gmail.com>
# # (c) 2017 Ansible Project
# This file is part of Ansible # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Ansible is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
from __future__ import (absolute_import, division, print_function) from __future__ import (absolute_import, division, print_function)
__metaclass__ = type __metaclass__ = type
@ -34,22 +21,22 @@ class LookupModule(LookupBase):
''' '''
# lookup sample: # lookup sample:
- name: lookup ssm parameter store in the current region - name: lookup ssm parameter store in the current region
debug: msg="{{ lookup('ssm', 'Hello' ) }}" debug: msg="{{ lookup('aws_ssm', 'Hello' ) }}"
- name: lookup a key which doesn't exist, return "" - name: lookup a key which doesn't exist, return ""
debug: msg="{{ lookup('ssm', 'NoKey') }}" debug: msg="{{ lookup('aws_ssm', 'NoKey') }}"
- name: lookup ssm parameter store in nominated region - name: lookup ssm parameter store in nominated region
debug: msg="{{ lookup('ssm', 'Hello', 'region=us-east-2' ) }}" debug: msg="{{ lookup('aws_ssm', 'Hello', 'region=us-east-2' ) }}"
- name: lookup ssm parameter store without decrypted - name: lookup ssm parameter store without decrypted
debug: msg="{{ lookup('ssm', 'Hello', 'decrypt=False' ) }}" debug: msg="{{ lookup('aws_ssm', 'Hello', 'decrypt=False' ) }}"
- name: lookup ssm parameter store in nominated aws profile - name: lookup ssm parameter store in nominated aws profile
debug: msg="{{ lookup('ssm', 'Hello', 'aws_profile=myprofile' ) }}" debug: msg="{{ lookup('aws_ssm', 'Hello', 'aws_profile=myprofile' ) }}"
- name: lookup ssm parameter store with all options. - name: lookup ssm parameter store with all options.
debug: msg="{{ lookup('ssm', 'Hello', 'decrypt=false', 'region=us-east-2', 'aws_profile=myprofile') }}" debug: msg="{{ lookup('aws_ssm', 'Hello', 'decrypt=false', 'region=us-east-2', 'aws_profile=myprofile') }}"
''' '''
ret = {} ret = {}