You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ansible/test/integration/targets/ansible/module_common_regex_regress...

16 lines
428 B
Bash

#!/usr/bin/env bash
# #74270 -- ensure we escape directory names before passing to re.compile()
# particularly in module_common.
set -eux
lib_path=$(python -c 'import os, ansible; print(os.path.dirname(os.path.dirname(ansible.__file__)))')
bad_dir="${OUTPUT_DIR}/ansi[ble"
mkdir "${bad_dir}"
cp -a "${lib_path}" "${bad_dir}"
PYTHONPATH="${bad_dir}/lib" ansible -m ping localhost -i ../../inventory "$@"
rm -rf "${bad_dir}"