New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP started and stopped are now commands that the rds module understands #43771

Open
wants to merge 1 commit into
base: devel
from

Conversation

Projects
None yet
3 participants
@sdubrul
Contributor

sdubrul commented Aug 7, 2018

SUMMARY

Added ability to start and stop a rds database by adding started and stopped as keywords for the command argument of the rds module.

The main functionality (i.e. starting and stopping) is available, however some things are still open (see TODO). I'm opening up this PR to get some more eyes on it.

ISSUE TYPE
  • Feature Pull Request
COMPONENT NAME

rds

ANSIBLE VERSION
ansible 2.7.0.dev0 (aws_rds_start_stop 07eac75db9) last updated 2018/08/07 13:49:21 (GMT +200)
  config file = None
  configured module search path = [u'/Users/sdubrul/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
  ansible python module location = /Users/sdubrul/code/github/ansible/lib/ansible
  executable location = /Users/sdubrul/code/github/ansible/bin/ansible
  python version = 2.7.15 (default, Jun 17 2018, 12:46:58) [GCC 4.2.1 Compatible Apple LLVM 9.1.0 (clang-902.0.39.2)]
ADDITIONAL INFORMATION

This module uses boto. Starting and stopping is only available in boto3 so I added some quick boilerplate for boto3 in the module.

Example of added functionality:

(venv) sdubrul@mac:~/code/github/ansible$ansible localhost, -m rds -a 'command=started instance_name=hdlz80cbrw9iyo'

localhost | SUCCESS => {
    "changed": false
}
(venv) sdubrul@mac:~/code/github/ansible$ansible localhost, -m rds -a 'command=stopped instance_name=hdlz80cbrw9iyo'
 
localhost | CHANGED => {
    "changed": true
}
ADDITIONAL INFORMATION TODO
@ansibot

This comment has been minimized.

Contributor

ansibot commented Aug 7, 2018

@ansibot

This comment has been minimized.

Contributor

ansibot commented Aug 7, 2018

Hi @sdubrul,

Thank you for the pullrequest, just so you are aware we have a dedicated Working Group for aws.
You can find other people interested in this in #ansible-aws on Freenode IRC
For more information about communities, meetings and agendas see https://github.com/ansible/community

click here for bot help

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment