Hi,

you can use notify in create DB to create schema. That way, it will be
called only on db creation.

David
 Dne 26.11.2013 17:42 "Fred Badel" <f...@never-mind.ch> napsal(a):

> Hello,
>
> I have a playbook that create a mysql DB and import an empty schema:
>
> - name: create DB
>   mysql_db: name={{ db_name }} state=present login_host=127.0.0.1
>
> - name: create schema
>   mysql_db: name={{ db_name }} state=import login_host=127.0.0.1
> target=/create_tables.sql
>
> From what i could notice, the sql file is imported each time the playbook
> is run ... (aka, the task is marked as changed each time I run the playbook)
> is this an expected behavior?
> does someone have a recommended way of using the import feature and run it
> only once?
>
> Thanks.
>
> Fred
>
> --
> 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-project+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>

-- 
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-project+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to