{"action":"opened","issue":{"url":"https://api.github.com/repos/ansible/ansible/issues/36104","repository_url":"https://api.github.com/repos/ansible/ansible","labels_url":"https://api.github.com/repos/ansible/ansible/issues/36104/labels{/name}","comments_url":"https://api.github.com/repos/ansible/ansible/issues/36104/comments","events_url":"https://api.github.com/repos/ansible/ansible/issues/36104/events","html_url":"https://github.com/ansible/ansible/issues/36104","id":296725267,"number":36104,"title":"Python API: Host Key Checking not configurable","user":{"login":"osLEccse","id":35256191,"avatar_url":"https://avatars3.githubusercontent.com/u/35256191?v=4","gravatar_id":"","url":"https://api.github.com/users/osLEccse","html_url":"https://github.com/osLEccse","followers_url":"https://api.github.com/users/osLEccse/followers","following_url":"https://api.github.com/users/osLEccse/following{/other_user}","gists_url":"https://api.github.com/users/osLEccse/gists{/gist_id}","starred_url":"https://api.github.com/users/osLEccse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/osLEccse/subscriptions","organizations_url":"https://api.github.com/users/osLEccse/orgs","repos_url":"https://api.github.com/users/osLEccse/repos","events_url":"https://api.github.com/users/osLEccse/events{/privacy}","received_events_url":"https://api.github.com/users/osLEccse/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-02-13T12:48:38Z","updated_at":"2018-02-13T12:48:38Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"##### ISSUE TYPE\r\n - Bug Report\r\n\r\n##### COMPONENT NAME\r\nPython API\r\n\r\n##### ANSIBLE VERSION\r\nansible 2.4.2.0\r\n  config file = /etc/ansible/ansible.cfg\r\n  configured module search path = [u'/home/ansible/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']\r\n  ansible python module location = /usr/lib/python2.7/site-packages/ansible\r\n  executable location = /usr/bin/ansible\r\n  python version = 2.7.5 (default, Aug  4 2017, 00:39:18) [GCC 4.8.5 20150623 (Red Hat 4.8.5-16)]\r\n\r\n\r\n##### CONFIGURATION\r\nDEFAULT_ROLES_PATH(/etc/ansible/ansible.cfg) = [u'/etc/ansible/roles', u'/usr/share/ansible/roles']\r\n\r\n##### OS / ENVIRONMENT\r\nN/A\r\n\r\n##### SUMMARY\r\nHost Key Checking cannot be configured with the Python API.\r\n\r\nThere are ways to achieve the configuration, either with the configuration file or the environment variable, but there is no way to do so with a programmatic approach. \r\n\r\nhttp://docs.ansible.com/ansible/latest/intro_getting_started.html#host-key-checking\r\n\r\n##### STEPS TO REPRODUCE\r\nUse the API with a basic setup like this:\r\n\r\nhttp://docs.ansible.com/ansible/latest/dev_guide/developing_api.html\r\n\r\nTry to set the Host Key Checking Option in the API Call.\r\n\r\nEnsure that is **not** configured in the ansible.cfg file or with the environment variable ANSIBLE_HOST_KEY_CHECKING\r\n\r\nlike described here:\r\n\r\nhttp://docs.ansible.com/ansible/latest/intro_getting_started.html#host-key-checking\r\n\r\n\r\n##### EXPECTED RESULTS\r\nThere should be a way to configure host key checking \r\n\r\nExample:\r\n\r\n\r\nOptions = namedtuple('Options', ['connection', 'module_path', 'forks', 'become', 'become_method', 'become_user', 'check', 'diff', 'host_key_checking'])\r\n# initialize needed objects\r\nloader = DataLoader()\r\noptions = Options(connection='local', module_path='/path/to/mymodules', forks=100, become=None, become_method=None, become_user=None, check=False,\r\n                  diff=False, host_key_checking=False)\r\n\r\n##### ACTUAL RESULTS\r\nHost key checking not configurable \r\n"}}
{"actor":{"display_login":"osLEccse"}}