# RDS Module "promote" function not working. Reporting "ok", but not making a change.

**URL:** <https://forum.ansible.com/t/rds-module-promote-function-not-working-reporting-ok-but-not-making-a-change/18582>\
**Category:** Ansible Project\
**Tags:** aws\
**Created:** [June 23, 2015, 4:24pm UTC](https://forum.ansible.com/t/rds-module-promote-function-not-working-reporting-ok-but-not-making-a-change/18582 "2015-06-23T16:24:53Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sena\_Heydari](https://avatars.discourse-cdn.com/v4/letter/s/ecb155/32.png) [@Sena\_Heydari](https://forum.ansible.com/u/Sena_Heydari)\
**Post date:** [June 23, 2015, 4:24pm UTC](https://forum.ansible.com/t/rds-module-promote-function-not-working-reporting-ok-but-not-making-a-change/18582/1 "2015-06-23T16:24:53Z")

</div>

The role play:

- name: Promote Read-Replica to New Standalone RDS Instance

rds:

command: promote

instance\_name: new-db

aws\_access\_key: “{{ some-key }}”

aws\_secret\_key: “{{ some-secret }}”

region: us-east-1

Output from -vvvv (anonymized):

\<127.0.0.1\> REMOTE\_MODULE rds region=us-east-1 command=promote aws\_access\_key=some-key aws\_secret\_key=some-secret instance\_name=new-db

\<127.0.0.1\> EXEC [‘/bin/sh’, ‘-l’, ‘-c’, ‘mkdir -p $HOME/.ansible/tmp/ansible-tmp-1435075726.85-46917134810376 && chmod a+rx $HOME/.ansible/tmp/ansible-tmp-1435075726.85-46917134810376 && echo $HOME/.ansible/tmp/ansible-tmp-1435075726.85-46917134810376’]

\<127.0.0.1\> PUT /tmp/tmpvipCL4 TO /home/dir/.ansible/tmp/ansible-tmp-1435075726.85-46917134810376/rds

\<127.0.0.1\> EXEC [‘/bin/sh’, ‘-l’, ‘-c’, u’LANG=en\_US.UTF-8 LC\_CTYPE=en\_US.UTF-8 /usr/bin/python /home/dir/.ansible/tmp/ansible-tmp-1435075726.85-46917134810376/rds; rm -rf /home/dir/.ansible/tmp/ansible-tmp-1435075726.85-46917134810376/ \>/dev/null 2\>&1’]

ok: [127.0.0.1] =\> {“changed”: false, “instance”: {“availability\_zone”: “us-east-1d”, “backup\_retention”: 0, “create\_time”: 1435073003.518, “endpoint”: “[new-db.account-num.us-east-1.rds.amazonaws.com](http://new-db.account-num.us-east-1.rds.amazonaws.com)”, “id”: “new-db”, “instance\_type”: “db.m3.large”, “iops”: null, “maintenance\_window”: “mon:03:00-mon:03:30”, “multi\_zone”: false, “port”: 3306, “replication\_source”: “source-db”, “status”: “available”, “username”: “someroot”, “vpc\_security\_groups”: “sg-something”}}

Testing run with full RDS rights for user with access-key/secret.

Boto Version also up to date:

Type “help”, “copyright”, “credits” or “license” for more information.

> > > import boto

> > > boto.Version

‘2.38.0’

Play runs as “ok”, but I confirmed the DB is still read-replica in AWS console.

Anything obvious I’m missing, or is this a bug?

---

<div class="post-metadata">

**Author:** ![MB1](https://avatars.discourse-cdn.com/v4/letter/m/74df32/32.png) [@MB1](https://forum.ansible.com/u/MB1)\
**Post date:** [September 2, 2015, 8:40pm UTC](https://forum.ansible.com/t/rds-module-promote-function-not-working-reporting-ok-but-not-making-a-change/18582/2 "2015-09-02T20:40:52Z")

</div>

Same problem here. No relevant output or error, but slave is not promoted.  
We use Ansible 1.9.2 and Boto 2.37.0.  
Should a Github issue be opened?

---

<div class="post-metadata">

**Author:** ![Greg\_DeKoenigsberg1](https://avatars.discourse-cdn.com/v4/letter/g/838e76/32.png) [@Greg\_DeKoenigsberg1](https://forum.ansible.com/u/Greg_DeKoenigsberg1)\
**Post date:** [September 3, 2015, 3:04pm UTC](https://forum.ansible.com/t/rds-module-promote-function-not-working-reporting-ok-but-not-making-a-change/18582/3 "2015-09-03T15:04:59Z")

</div>

I would recommend opening an issue, yes.

--g
