'Sends facts to Foreman, to be parsed by foreman_ansible fact
parser.  The default fact importer should import these facts
properly.'

def send_facts(self, host, data):

    data['_type'] = 'ansible'
    data['_timestamp'] = datetime.now().strftime(self.TIME_FORMAT)
    facts = {'name': host, 'facts': data}
    requests.post(url=(self.FOREMAN_URL + '/api/v2/hosts/facts'), data=json.dumps(facts), headers=self.FOREMAN_HEADERS, cert=self.FOREMAN_SSL_CERT, verify=self.ssl_verify)
