I am making a simple script that will run on the Ansible node, and notify me via Slack api if upgrades are available.If I execute script in my hosts (all Debian based), I receive notification in the Slack app as desired, but when it is run via Ansible, plays reports no errors but I never got the output.What could be the issue? I am out of the ideas.Bash script ran in the Ansible:#!/bin/bashUPGRADE_LIST=$(mktemp)HOLDED_PACKAGES=$(mktemp)TMP=$(mktemp)HOST=$(hostname)APT=$(which apt)#Get packages that are holded by the pkg managerdpkg --get-selections | awk '/hold$/{print $1}' > ${HOLDED_PACKAGES}#Get list of upgradeable packages$APT list --upgradable > ${UPGRADE_LIST}#Filter itawk  '/.*\/.*/ {FS=/;  print $1 }' ${UPGRADE_LIST} > ${TMP}slack () {    a=$1    curl -X POST -H Content-type: application/json --data {\text\:\${a}\} API HOOK}COUNT=$(wc -l ${TMP})    # If count is not equal to 0, then there available packages for upgrade    if [[ $COUNT != 0 ]]; then        c=Upgrade available for $HOST        slack $c        #Print only those that aren't holded by dpkg        while read line; do             pkg=$(grep -v $line ${TMP})            slack ${pkg}            pkg=        done < ${HOLDED_PACKAGES}    else      b=No upgrade available for ${HOST}     slack  $b    fi#CLEANUPrm ${TMP} ${UPGRADE_LIST} ${HOLDED_PACKAGES}Playbook:---- hosts: debian  tasks:    - script: /etc/ansible/scripts/update-manager.shEdit:Fixed. Was the local issue within inventory. It was pointing to a localhost which is Alpine.
Unable to execute Curl request from Ansible playbook script
bash;shell script;curl;ansible