GithubHelp home page GithubHelp logo

bwits / ssm_parameter_store Goto Github PK

View Code? Open in Web Editor NEW
9.0 6.0 4.0 46 KB

[Abandoned] ansible module to manage key/value in aws parameter store

License: GNU General Public License v3.0

Python 99.58% Shell 0.42%
ansible-modules ansible ansible-lookups

ssm_parameter_store's People

Contributors

billamp avatar capusta avatar ozbillwang avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

ssm_parameter_store's Issues

failed when using aws default key_id aws/ssm

looks like, with calling client.put_parameter, if you passed KeyId='aws/ssm', you will get InvalidKeyId
so in the case without key_id option or key_id is set 'aws/ssm', KeyId can't be present when making put_parameter call.

Parameter Store lookups should include support for nested parameters

Hey Bill,

Thanks so much for not only open sourcing your efforts here, but also for taking the time to submit them upstream to Ansible. Turned my few-day PoC for secrets in SSM Parameter Store into a few-hour project.

Would you have any interest in implementing a recursive GET for parameters occupying a given path, delivered as a dictionary? It's unclear to me from the API documentation whether GetParametersByPath will deliver a mix of String and SecureString values, or error if unencrypted values are encountered (in which case this would need to be a DescribeParameters -> GetParameter loop). I'd suspect the former.

The use case for me is wanting a full tree of envvars in /environ/project/env/ deployed with each Ansible run rather than needing to advance a Jinja2 template through environments where the key existing in Parameter Store is unreliable.

I'm happy to implement this if you don't see any pitfalls and would consider this project rather than Ansible, the proper place to send a PR. Thanks!

Creating a parameter throws 'botocore' is not defined

Hello,

I'm trying to use the example to create a parameter:

         - name: Create or update key/value pair in aws parameter store
           ssm_parameter_store:
             name: "Hello"
             description: "This is your first key"
             value: "World"


It results in this:

Traceback (most recent call last):
  File "/tmp/ansible_i50RV5/ansible_module_ssm_parameter_store.py", line 221, in <module>
    main()
  File "/tmp/ansible_i50RV5/ansible_module_ssm_parameter_store.py", line 210, in main
    except botocore.exceptions.NoCredentialsError as e:
NameError: global name 'botocore' is not defined

fatal: [localhost]: FAILED! => {
    "changed": false, 
    "failed": true, 
    "module_stderr": "Traceback (most recent call last):\n  File \"/tmp/ansible_i50RV5/ansible_module_ssm_parameter_store.py\", line 221, in <module>\n    main()\n  File \"/tmp/ansible_i50RV5/ansible_module_ssm_parameter_store.py\", line 210, in main\n    except botocore.exceptions.NoCredentialsError as e:\nNameError: global name 'botocore' is not defined\n", 
    "module_stdout": "", 
    "msg": "MODULE FAILURE", 
    "rc": 0
}

Strange thing that lookups work!

         - name: Parameters can be provided after the key be more specific about what to retrieve
           debug: msg='key contains {{item}}'
           with_ssm:
             - '/UAT'
             - 'region=ap-southeast-2'

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.