diff --git a/tasks/misp-add-user.yml b/tasks/misp-add-user.yml index 2873a80..d8b764e 100644 --- a/tasks/misp-add-user.yml +++ b/tasks/misp-add-user.yml @@ -3,6 +3,8 @@ #- debug: var=list - name: add user {{ user.email }} command: "{{ python3_bin }} ./add_user.py -e {{ user.email }} -o {{ user.org }} -r {{ user.role }} chdir={{ misp_rootdir }}/PyMISP/examples" + environment: + PYTHONPATH: /usr/local/lib/python3.6/site-packages when: list.stdout.find(user.email) == -1 and user.email is defined register: out #- debug: var=out diff --git a/tasks/misp-add-users.yml b/tasks/misp-add-users.yml index 06b35f4..b856bba 100644 --- a/tasks/misp-add-users.yml +++ b/tasks/misp-add-users.yml @@ -46,12 +46,15 @@ chdir: "{{ misp_rootdir }}/PyMISP/examples" environment: debug: True + PYTHONPATH: /usr/local/lib/python3.6/site-packages register: test changed_when: false ignore_errors: true - name: list current users command: "{{ python3_bin }} ./users_list.py chdir={{ misp_rootdir }}/PyMISP/examples" + environment: + PYTHONPATH: /usr/local/lib/python3.6/site-packages register: listusers changed_when: false diff --git a/test/integration/default/serverspec/mispmodules_spec.rb b/test/integration/default/serverspec/mispmodules_spec.rb index 7b0e31f..8b1538d 100644 --- a/test/integration/default/serverspec/mispmodules_spec.rb +++ b/test/integration/default/serverspec/mispmodules_spec.rb @@ -3,6 +3,8 @@ # Required by serverspec set :backend, :exec +set :path, '/usr/local/bin:$PATH' + describe command("pip3 freeze") do its(:stdout) { should match /cybox/ } its(:stdout) { should match /pymisp/ }