Disable warning for using sed

Eliminates the following warning:
[WARNING]: Consider using template or lineinfile module rather than running sed

Also sets the shell to ensure that we have a
consistent environment.

Change-Id: Ic712a68dd07a13a1ac5d8d3caed3b197123affac
This commit is contained in:
Jesse Pretorius 2018-03-28 10:52:26 +01:00
parent 4d89d534ba
commit d21600b1fa
1 changed files with 3 additions and 0 deletions

View File

@ -50,6 +50,9 @@
shell: |
sed -si '1s/^.*python.*$/#!{{ (venv_destination_path ~ '/bin') | replace ('/','\/') }}\/python/' {{ venv_destination_path }}/bin/*
virtualenv {{ venv_destination_path }}
args:
executable: /bin/bash
warn: no
when:
- (_venv_checksum_copy is mapping and _venv_checksum_copy | changed) or
_venv_dir_create | changed