X-Git-Url: https://gerrit.fd.io/r/gitweb?p=csit.git;a=blobdiff_plain;f=resources%2Flibraries%2Fbash%2Ffunction%2Fansible.sh;h=5bf122e4b0c85d256f0a6c7627a1521065333808;hp=663861e8d8cd0f21a58c66f064d65e452df4ed04;hb=36d56bdb7f9f394047e2df3f29bf47db877b649c;hpb=e45404bf7b8cbdb10adf85815c2e005134e463ad diff --git a/resources/libraries/bash/function/ansible.sh b/resources/libraries/bash/function/ansible.sh index 663861e8d8..5bf122e4b0 100644 --- a/resources/libraries/bash/function/ansible.sh +++ b/resources/libraries/bash/function/ansible.sh @@ -17,6 +17,7 @@ set -exuo pipefail function ansible_hosts () { + # Run ansible playbook on hosts in working topology file. Ansible scope is # determined by tags passed as parameters to this function. # @@ -51,15 +52,15 @@ function ansible_hosts () { function installed () { - set -exuo pipefail - # Check if the given utility is installed. Fail if not installed. # # Arguments: # - ${1} - Utility to check. - # Returns: + # Returns (implicitly): # - 0 - If command is installed. # - 1 - If command is not installed. + set -exuo pipefail + command -v "${1}" -} \ No newline at end of file +}