Skip to content

Instantly share code, notes, and snippets.

View vorotech's full-sized avatar
🇺🇦
Stand With Ukraine!

Dmytro vorotech

🇺🇦
Stand With Ukraine!
View GitHub Profile
@vorotech
vorotech / google_drive_dedup.ts
Created December 15, 2021 20:31
Find duplicates in Google Drive with TypeScript
// Original example was written with Next JS, but can be any framework
// Authorization part is skipped, see the docs of the framework
// Importatnt notice, when authenticating with Google the extended scope
// which includes 'https://www.googleapis.com/auth/drive' should be requested
import { NextApiRequest, NextApiResponse } from 'next'
import jwt from 'next-auth/jwt'
import { drive_v3, google } from 'googleapis'
const secret = process.env.NEXTAUTH_JWT_SECRET

Investiagate mystical tmp path when remote is Pod container

The Problem

When executing Ansible tasks targeting remote pod container, any of the Ansible bubble wrapped modules receive the invalid tmp directory which cannot be resolved.

The example of invalid path /~zuul/.ansible/tmp/ansible-tmp-1602657590.3517509-66-230912263536663/source where the ~ part is resovled to HOME directory and breaks everything.