mysql_user module doesnt create user for RDS

38 views
Skip to first unread message

prateek gupta

unread,
Apr 15, 2014, 7:15:57 AM4/15/14
to ansible...@googlegroups.com
im trying to create a user for mysql DB rds and just trying to execute the following 

---
 - hosts: localhost
   tasks:
   - name: sql user creation
     mysql_user: login_host=ABCDE.us-west-2.rds.amazonaws.com login_port=3306 login_user=klm login_password=klm123 name=marley password=klm123 state=absent


i get the following output 
-------------------

PLAY [localhost] **************************************************************

GATHERING FACTS ***************************************************************
ok: [localhost]

TASK: [sql user creation] *****************************************************
ok: [localhost]

PLAY RECAP ********************************************************************
localhost                  : ok=2    changed=0    unreachable=0    failed=0


It doesnt create the user on the backend as changed=0



Adam Morris

unread,
Apr 15, 2014, 12:09:00 PM4/15/14
to ansible...@googlegroups.com
This is working as designed...

If you want the user created you should have state=present.  What you are showing us makes sure that the user doesn't exist.

(And you didn't need to ask four times in two lists).

Adam
Reply all
Reply to author
Forward
0 new messages