Moved ignored_hostgroup logic to a library.