You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Aug 27, 2024. It is now read-only.
In the uninstall class the find_file function is used to check if the path $created_dir exists and determine if the uninstall script should be run. This function is executed on the puppet server instead of the agent so the behavior is not as expected.
Since the uninstall is done through Exec resources, the onlyif attribute could be used to check the existence of the $created_dir path in the agent instead of using the find_file function and the $created_dir_exists variable.
The following commands could be used to perform the required check:
Linux/AIX: test -f '${created_dir}'
Windows PowerShell: Test-Path -Path '${created_dir}' -PathType Leaf
In the uninstall class the find_file function is used to check if the path $created_dir exists and determine if the uninstall script should be run. This function is executed on the puppet server instead of the agent so the behavior is not as expected.
Since the uninstall is done through Exec resources, the onlyif attribute could be used to check the existence of the $created_dir path in the agent instead of using the find_file function and the $created_dir_exists variable.
The following commands could be used to perform the required check:
Linux/AIX:
test -f '${created_dir}'
Windows PowerShell:
Test-Path -Path '${created_dir}' -PathType Leaf
The class would be as follows:
The text was updated successfully, but these errors were encountered: