Score:0

saltstack cmd.run variable expansion

cn flag

I can get salt to let me run keytool this way:

salt [host] cmd.run shell=powershell '& "$JRE_HOME/bin/keytool.exe" --help'

But I can't figure out how to put this into a state file. A straightforward translation fails saying "& was unexpected at this time".

cmd.run:
 - shell: powershell
 - name: '& "$JRE_HOME/bin/keytool.exe" --help'

I've tried dozens of variations on this, but have yet to find one that works.

Score:0
cn flag

I finally stumbled upon a solution.

  - name: ; & "${env:JRE_HOME}/bin/keytool" --help
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.