" as I was running several tasks in a row, all using with_items on the same
array and could not use a handler."
If using with_items and a handler, you'll get one notification if anything
in the list reports changed.
I think what you have is ok really, because you'll want those things to
happen "t
Hi, First of all I want to thank you all for this thread, it helped me
solve a problem that I was struggling with. This is my first post to the
group and want to say hello :)
I have a slightly different solution to this problem as I was running
several tasks in a row, all using with_items on th
Nope, I'm good - I'm not super interested in MySQL so I'm
not personally going to take part in writing this module. Might be useful
and/or fun for someone to tackle.
On Wednesday, June 11, 2014, Michael DeHaan wrote:
> "This might be a good opportunity to create a MySQL facts module that
> retu
Coming into this discussion a little late, but here's an example to
illustrate what's being suggested:
Play:
- name: Ensure example database exists.
mysql_db: name=exampledb state=present
notify: import example database
Handler:
- name: import example database
mysql_db: name=example stat
I don’t know why, but in my mind, notifying handlers was only to restart a
service … now I can see the light!! :)
Although, this would not help if the db exists but is empty, you just help me
understand how I can use and how useful “notify” can be !
Thank you.
fred
On Nov 26, 2013, at 19:18
Hi,
I was more thinking of checking the existence of the tables, as the database
might exist but be empty …
I guess the way to go would be to query the “information_schema” for the
existence of the tables and register the result …
Thanks for the tip.
Cheers,
fred
On Nov 26, 2013, at 19:15 ,
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" 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 }} sta
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