Hi,
you can use notify in create DB to create schema. That way, it will be called only on db creation.
David
--
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-proje...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
It looks like the mysql_db module will blindly run mysqldump wiht the specified target file if it's specified, so yes it's currently expected behavior.What you would probably need to do is run an action before you call mysql_db that checks to see if the database already exists and register a variable so that you can call create DB only if you need to. This could be something along the lines of:-name: check if DB existsshell: mysql -u <user> -p <password> -h <host> 'show databases;' | grep {{ db_name }}register: dbstatus
--
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-proje...@googlegroups.com.
To post to this group, send email to ansible...@googlegroups.com.To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CAK6JQEGtNRAcsdnTpAg7wFneZkKuBXifdh8_P%3DhHA-HenSqY6Q%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CA%2BnsWgz1H%3DxJOK18kK0MLoUiYfyjJYvyi2MEN2aZso2%3DSCCkcw%40mail.gmail.com.
To post to this group, send email to ansible...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/c622bc6c-d7c9-4440-81bb-1d048b8df7c3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.