2016-08-23 20:13:44 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
BASEDIR=${1-"."}
|
|
|
|
|
|
|
|
# Not entirely correct but
|
|
|
|
# * basestring is still present and harmless in comments
|
|
|
|
# * basestring is also currently present in modules. Porting of modules is more
|
|
|
|
# of an Ansible 2.3 or greater goal.
|
2016-11-04 06:30:27 +00:00
|
|
|
BASESTRING_USERS=$(grep -r basestring "${BASEDIR}" \
|
|
|
|
| grep isinstance \
|
|
|
|
| grep -v \
|
|
|
|
-e lib/ansible/compat/six/_six.py \
|
|
|
|
-e lib/ansible/module_utils/six.py \
|
|
|
|
-e lib/ansible/modules/core \
|
|
|
|
-e lib/ansible/modules/extras \
|
|
|
|
-e '/.tox/' \
|
|
|
|
)
|
2016-08-23 20:13:44 +00:00
|
|
|
|
2016-11-04 06:30:27 +00:00
|
|
|
if test -n "${BASESTRING_USERS}"; then
|
|
|
|
printf "%s" "${BASESTRING_USERS}"
|
2016-08-23 20:13:44 +00:00
|
|
|
exit 1
|
|
|
|
else
|
|
|
|
exit 0
|
|
|
|
fi
|