In the future these types of questions should probably go to ansible-devel, not ansible-project.
You can do this by manipulating the "constant". import ansible.constants as C C.HOST_KEY_CHECKING = False On Wednesday, December 17, 2014, <[email protected]> wrote: > Hello everyone, > > I'm trying to trigger Ansible run from a Python application and I can't > disable host key checking. > > I've already tried: > - passing parameter via extra_vars in the same manner as from CLI, and > then transforming it into a dictionary the same way as in ansible-playbook > - assembling a dictionary with the parameters > > It keeps asking if I want to continue connecting to the host. > > extra_vars is evaluated like this now: {u'host_key_checking': u'no', > u'record_host_keys': u'no'} > > Could anyone advise please? > > Kind regards, > Pavel Chunyayev > > -- > 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 [email protected]. > To post to this group, send email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/ansible-project/aba2db6e-8455-449d-a476-dec7137d5fa6%40googlegroups.com > <https://groups.google.com/d/msgid/ansible-project/aba2db6e-8455-449d-a476-dec7137d5fa6%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- 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 [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CAD8N0v9gyN-nK2yLw_BipENxEJKfNML40VZE42beCMdpK2Sq_w%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
