Create a RDS mysql user using mysql_user module

Im trying to create a mysql user for the following

#creating a sql user

++++++++++2nd script++++++++++++

#creating a sql user

but i get the following error for both of it

ERROR: Syntax Error while loading YAML script, sqluser.yml
Note: The error may actually appear before this position: line 4, column 2

  • hosts: localhost
    tasks:

“tasks:” should be indented and inline with “hosts”

Hey Thanks a lot thats working now But i have got a new error as of know
Im able to get connected to rds using mysql command but when i try to run through ansible playbook i get the following error

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

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

TASK: [mysql_user host=abc5.us-west-2.rds.amazonaws.com login_port=3306 login_user=abc login_password=abc123 name=sally password=abc123 state=absent] ***
failed: [localhost] => {“failed”: true}
msg: unable to connect to database, check login_user and login_password are correct or ~/.my.cnf has the credentials

FATAL: all hosts have already failed – aborting

PLAY RECAP ********************************************************************
to retry, use: --limit @/root/sqluser.retry

localhost : ok=1 changed=0 unreachable=0 failed=1

Hi,

Just a quick note that is a user question, not a development question, so in the future please post this to ansible-project@googlegroups.com. Thanks!