I am playing with SaltStack configured by org babel source blocks. I try to pass output of salt fingerprint to minion configuration file. If I use one command direcly in bash I receive this output:
# salt-key -f master.pub Local Keys: master.pub: 66:bf:a3:8f:f5:09:01:78:dc:d7:34:80:42:d0:ab:b6:f1:f6:67:ee:dd:80:10:d6:90:58:71:48:fa:d9:24:2c
When I try to execute the same command in org babel I receive different result (I attach screen because my browser doesn't support this symbol):
#+begin_src sh :session master salt-key --finger=master.pub #+end_src
Because of this ^[ characters I receive wrong while extracting value of master.pub key which I need in further processing:
#+begin_src sh :session minion :var FINGERPRINT=fingerprint[1,1] echo $FINGERPRINT #+end_src #+RESULTS: | | | 66:bf:a3:8f:f5:09:01:78:dc:d7:34:80:42:d0:ab:b6:f1:f6:67:ee:dd:80:10:d6:90:58:71:48:fa:d9:24:2c;0m |
And because of the ";0m" at the end (I am not sure what it is) I can't copy and paste this value to configuration file. I tried different types of results (raw, table, list), but always I receive this characters. Anyone have idea how can I deal with this?