Hi,
caveat - new to ansible.
I have a host that just happens to have chef client installed and is also authenticating to an LDAP with 38,000 users in it.
When I run
$ ansible -m setup -i hosts hostname
it takes a very login time to return, because the ansible setup module is finding ohai on the host and that is returning every user in the LDAP.

This problem exists for chef server as well but the chef server allows for disabling the ohai passwd plugin.
Ohai documentation tells me it is not possible to disable in this way when run directly on the client host.
Looking at the ansible setup module python code, it looks like there is no way to say “don’t use ohai even if present”.
Am I missing something, is there an easy way around this problem with ansible, apart from removing the chef-client ?
Thanks,
Pete
This is true that Ansible will use ohai if installed and doesn’t auto-remove it.
Your workaround right now would be to uninstall ohai.
I’ve pondered removing the facter/ohai integration in the past, though it can be useful to help users migrating from other tools or having to still work with them in some places.
It does seem sad that it would automatically assume we’d want every user in LDAP, and this may warrant the idea that this should be configurable. Perhaps we could have the setup system pass a “use_legacy_facts” parameter down and have this configurable in ansible.cfg (default off)?
If this is something someone would like to work on, that would be a welcome addition and probably not terribly difficult.
Uninstalling ohai of course will definitely fix the problem 
add ignore_ohai and ignore_facter =true (default false) to setup module and ansible.cfg?
How about: default:
fact_gathering=core,ohai,facter
?
That way it’s more pluggable-ish
Did this ever make it into trunk?
I’ve hit a case where I’d like to be able to disable the automatic ohai fact-gathering.