inventory_file = 'ansible_inventory'
inventory = ansible.inventory.Inventory(inventory_file)
runner = ansible.runner.Runner(module_name='setup', module_args='', pattern
    ='all', inventory=inventory)
cluster_facts = runner.run()
pprint.pprint(cluster_facts)
Monitor a cluster of nodes