Adding a key for a yum repository inside a template

I would split the first step in two:

  1. download the key to a disposable qube (didpVM) and verify it there, then copy it to the template (qvm-copy or “Copy to VM”)
  2. in the template, import it into rpm

Does that make sense to you?

Edit: What prevents you from performing the second of the three steps?