'Main execution path'

def run(self):

    successful = True
    if self.args.refresh_cache:
        successful = self.update_cache()
    elif (not self.is_cache_valid()):
        successful = self.update_cache()
    else:
        successful = self.load_inventory_from_cache()
        successful &= self.load_cache_from_cache()
    data_to_print = ''
    if self.args.host:
        data_to_print = self.get_host_info()
    elif self.args.list:
        data_to_print = self.json_format_dict(self.inventory, self.args.pretty)
    else:
        data_to_print = self.json_format_dict(self.inventory, self.args.pretty)
    print data_to_print
    return successful
