Executing python script on ansible master once playbook finishes

Dear all,

i am new to the awesomeness of ansible.
i’ve done some playbooks for now an am amazed of the capability of ansible. :slight_smile:
great product.

Now i got to a certain point where i could need some help.

My Setup:
The ansible version i am using is: Anisble 1.9.4
I am running ansible on a Red Hat Enterprise Linux Server release 6.7 (Santiago)
i am controlling Linux nodes with Ansible from the same system distribution

My Problem/Question:
I’ve created a Playbook that is going to copy a template towards my node.
while doing this it inserts some facts information via the template plugin.
After that i am going to fetch that file back to my Ansible master.

Now i want to execute a local python script on my ansible master to parse those files into a database.
But i don’t have any idea how to do that.
I would be so happy if anyone could give me a hint :slight_smile:

Thanks in advance.

Best regards,
Martin

Playbook

something like this:

  • name: run script locally # can also use the script module
    shell: /path/to/script
    delegate_to: localhost
    run_once: True

DUDE!
thank you so much! ^^
it is exactly what i was looking for!

hell yeah ;D

again, thank you very much