Execution
Date 03 Mar 2026 20:03:05 +0000
Duration 00:00:38.35
Controller ssh-gw-4.layershift.com
User root
Versions
Ansible 2.16.13
ara 1.7.4 / 1.7.4
Python 3.10.10
Summary
6 Hosts
3 Tasks
15 Results
1 Plays
1 Files
0 Records

Task result details


Field Value
changed
False
cmd
set -o pipefail
paths=$(find /opt/alt/php* -name "default.ini" | xargs grep -l "ioncube_loader_lin" 2>/dev/null)

if [[ -n "$paths" ]]; then
  package_names=$(echo "$paths" | awk -F'/' '{ print $3 "-" $4 "-ioncube-loader" }' )

  while IFS= read -r path <&3 && IFS= read -r package <&4; do

    if [[ "$package" == *"alt-php"* && "$path" == "/opt/alt/php"* ]]; then
      echo "[ INFO ] Installing package: $package"

      if yes | dnf install "$package"; then
        echo "[ INFO ] Removing the ioncube_loader_lin.so module from $path!"
        sed -i '/zend_extension=\/opt\/alt\/php.*\/ioncube_loader_lin_.*\.so/d' "$path"

        php_bin=$(echo $path | sed 's|/etc/php.d/default.ini|/usr/bin/php|')
        ioncube_ini=$(echo $path | sed 's|/php.d/default.ini|/php.d.all/ioncube_loader.ini|')
        dest_path=$(echo $path | sed 's|default.ini|10-ioncube_loader.ini|')

        ln -s "$ioncube_ini" "$dest_path"

        if ! "$php_bin" -i |  grep -w "ionCube24 v1[4-5]"; then
          echo "[ ERROR ] Ioncube wasn't enabled successfully!"
          exit 128
        else
          echo "[ INFO ] Ioncube was enabled successfully!"
          exit 0
        fi

      else
        echo "[ ERROR ] Failed to install $package. Stopping script!"
        exit 128
      fi

    else
      echo "[ ERROR ] Something went wrong: $path $package"
      exit 128
    fi

  done 3<<< "$paths" 4<<< "$package_names"
  find /opt/alt/php* -name "ioncube_loader_lin*.so" -type f -delete

else
  echo "[ INFO ] ioncube_loader_lin.so file wasn't found!"
fi
delta
0:00:33.796520
end
2026-03-03 20:03:42.763885
failed_when_result
False
invocation
{
    "module_args": {
        "_raw_params": "set -o pipefail\npaths=$(find /opt/alt/php* -name \"default.ini\" | xargs grep -l \"ioncube_loader_lin\" 2>/dev/null)\n\nif [[ -n \"$paths\" ]]; then\n  package_names=$(echo \"$paths\" | awk -F'/' '{ print $3 \"-\" $4 \"-ioncube-loader\" }' )\n\n  while IFS= read -r path <&3 && IFS= read -r package <&4; do\n\n    if [[ \"$package\" == *\"alt-php\"* && \"$path\" == \"/opt/alt/php\"* ]]; then\n      echo \"[ INFO ] Installing package: $package\"\n\n      if yes | dnf install \"$package\"; then\n        echo \"[ INFO ] Removing the ioncube_loader_lin.so module from $path!\"\n        sed -i '/zend_extension=\\/opt\\/alt\\/php.*\\/ioncube_loader_lin_.*\\.so/d' \"$path\"\n\n        php_bin=$(echo $path | sed 's|/etc/php.d/default.ini|/usr/bin/php|')\n        ioncube_ini=$(echo $path | sed 's|/php.d/default.ini|/php.d.all/ioncube_loader.ini|')\n        dest_path=$(echo $path | sed 's|default.ini|10-ioncube_loader.ini|')\n\n        ln -s \"$ioncube_ini\" \"$dest_path\"\n\n        if ! \"$php_bin\" -i |  grep -w \"ionCube24 v1[4-5]\"; then\n          echo \"[ ERROR ] Ioncube wasn't enabled successfully!\"\n          exit 128\n        else\n          echo \"[ INFO ] Ioncube was enabled successfully!\"\n          exit 0\n        fi\n\n      else\n        echo \"[ ERROR ] Failed to install $package. Stopping script!\"\n        exit 128\n      fi\n\n    else\n      echo \"[ ERROR ] Something went wrong: $path $package\"\n      exit 128\n    fi\n\n  done 3<<< \"$paths\" 4<<< \"$package_names\"\n  find /opt/alt/php* -name \"ioncube_loader_lin*.so\" -type f -delete\n\nelse\n  echo \"[ INFO ] ioncube_loader_lin.so file wasn't found!\"\nfi\n",
        "_uses_shell": true,
        "argv": null,
        "chdir": null,
        "creates": null,
        "executable": "/bin/bash",
        "expand_argument_vars": true,
        "removes": null,
        "stdin": null,
        "stdin_add_newline": true,
        "strip_empty_ends": true
    }
}
msg
non-zero return code
rc
128
start
2026-03-03 20:03:08.967365
stderr
Error: Unable to find a match: alt-php53-ioncube-loader
stderr_lines
[
    "Error: Unable to find a match: alt-php53-ioncube-loader"
]
stdout
[ INFO ] Installing package: alt-php53-ioncube-loader
This system is receiving updates from CloudLinux Network server.
Last metadata expiration check: 3:02:58 ago on Tue 03 Mar 2026 05:00:39 PM GMT.
All matches were filtered out by exclude filtering for argument: alt-php53-ioncube-loader
[ ERROR ] Failed to install alt-php53-ioncube-loader. Stopping script!
stdout_lines
[
    "[ INFO ] Installing package: alt-php53-ioncube-loader",
    "This system is receiving updates from CloudLinux Network server.",
    "Last metadata expiration check: 3:02:58 ago on Tue 03 Mar 2026 05:00:39 PM GMT.",
    "All matches were filtered out by exclude filtering for argument: alt-php53-ioncube-loader",
    "[ ERROR ] Failed to install alt-php53-ioncube-loader. Stopping script!"
]