#534·yadm

Use encryption AND templating on the same file?

Author: albertsj1Created Aug 8, 2025Updated Aug 21, 2025
Labelsquestion

This question is about

  • Installation
  • Initializing / Cloning
  • Alternate files
  • Jinja templates
  • Encryption
  • Bootstrap
  • Hooks
  • Other

Describe your question

I've been using yadm for a while and it works great. I use it to manage my files on both my personal and work computers. I've made use of a bootstrap script and yadm templates when there are differences in configuration between my home and work computer for the same files.

I've been managing my aws cli credentials file (~/.aws/credentials) using encryption (yadm encrypt) but I've only been managing my personal credentials. I'd now like to be able to also manage my work computer aws cli credentials using yadm. This means the ~/.aws/credentials file would be different depending on if this is a work computer or home computer.

Is it possible for me to use yadm to have a different contents of a file such as ~/.aws/credentials depending on the computer AND have that file be encrypted using the yadm encrypt command?