Hi,

As discussed at here a long time ago 
<https://groups.google.com/forum/#!msg/ansible-project/XrQ08TdtcRk/I4s7rF7GkyMJ>,mysql_db
 
state=import will import the given file unconditionally.

There's a good chance the database has been updated since the original run 
of ansible, so this behavior means users should never run ansible after the 
server goes public.

The link above discusses several options for only running import once, but 
the nuances and trade-offs of each are lost on me as a non-expert.

I would suggest that, since we're not talking about a write-once sort of 
target like conf files in /etc, this behavior is bad.  In fact, it just now 
nearly wiped out a bunch of data for me as I made a configuration change 
and confidently (stupidly?) re-ran my ansible script.

The import function should refuse to import data if there's already data in 
the database.  Or, it shouldn't be it's own 'state' (not really a state) 
and be a part of the actions done for state == 'present'.

Have I convinced anybody?  If so, I'll file a bug on GitHub... didn't want 
to clutter that if I'm off the mark.


-- 
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.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/2fe8ee8f-3dbd-472e-800b-e16a39ced7b3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to