def METHOD_NAME(args, instances):
    with open(os.path.join(args.base_dir, "tools", "appsre-ansible", "inventory"), 'w') as f:
        f.write("[rpmbuilder]\n")
        for i in instances:
            f.write(f"{i.public_ip_address}\n")