diff --git a/tasks/neutron_install_source.yml b/tasks/neutron_install_source.yml index 826385d2..28a87cf6 100644 --- a/tasks/neutron_install_source.yml +++ b/tasks/neutron_install_source.yml @@ -92,7 +92,9 @@ # to https://github.com/pypa/virtualenv/issues/565 - name: Update virtualenv path shell: | + set -o errexit find {{ neutron_bin }} -name \*.pyc -delete + if test -d {{ neutron_bin }}/__pycache__; then rmdir {{ neutron_bin }}/__pycache__; fi sed -si '1s/^.*python.*$/#!{{ neutron_bin | replace ('/','\/') }}\/python/' {{ neutron_bin }}/* virtualenv {{ neutron_bin | dirname }} \ {{ (ansible_pkg_mgr == 'apt') | ternary('--always-copy', '') }} \