Forum Discussion

davefm's avatar
davefm
New Contributor
29 days ago
Solved

op from a remote docker container?

Hi, We're using (linux) ssh remotely to connect to an on-prem bastion.  Behind the bastion is a docker container we use for ansible deployment. There are several playbooks that need environment vari...
  • davefm's avatar
    2 days ago

    Figured out a great way to do this!

    • ssh will preserve environment variables prefixed with `LC_`
    • render 1Password secrets into `LC_` prefix variable eg:

      `export LC_PASSWORD=$(op read "op://Employee/test-pass/password")`

    • ssh into remote system or jump host
    • LC_ variables are carried into the remote session eg: `echo $LC_PASSWORD`