As part of a salt state file I am installing nghttp2.
So far I have the following code in my .sls
install_nghttp2:
cmd.run:
- name: |
cd /tmp
wget https://github.com/nghttp2/nghttp2/releases/download/v1.16.0/nghttp2-1.16.0.tar.gz
tar -xf nghttp2-1.16.0.tar.gz
cd ./nghttp2-1.16.0
./configure
make
make install
- shell: /bin/bash
- require:
- pkg: install_nghttp2_deps
- unless: test -x /tmp/nghttp2-1.16.0
I'm a little wary of the - unless
requisite and was wondering if anyone had a better way to check nghttp2 hasn't already been installed? I'd rather do something to check it hasn't been installed rather than just check whether it's been downloaded - unless (pun intended...kinda) anyone has a better suggestion?