File: issue_152__virtualenv_python_fails.yml

package info (click to toggle)
python-mitogen 0.3.0~rc1-4
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 3,240 kB
  • sloc: python: 19,899; sh: 91; perl: 19; ansic: 18; makefile: 13
file content (32 lines) | stat: -rw-r--r-- 1,020 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
- name: regression/issue_152__virtualenv_python_fails.yml
  any_errors_fatal: true
  gather_facts: true
  hosts: test-targets
  tasks:
    - custom_python_detect_environment:
      register: lout

    # Can't use pip module because it can't create virtualenvs, must call it
    # directly.
    - shell: virtualenv /tmp/issue_152_virtualenv
      when: lout.python_version > '2.6'
      environment:
        https_proxy: "{{ lookup('env', 'https_proxy')|default('') }}"
        no_proxy: "{{ lookup('env', 'no_proxy')|default('') }}"
        PATH: "{{ lookup('env', 'PATH') }}"

    - custom_python_detect_environment:
      vars:
        ansible_python_interpreter: /tmp/issue_152_virtualenv/bin/python
      register: out
      when: lout.python_version > '2.6'

    - assert:
        that:
          - out.sys_executable == "/tmp/issue_152_virtualenv/bin/python"
      when: lout.python_version > '2.6'

    - file:
        path: /tmp/issue_152_virtualenv
        state: absent
      when: lout.python_version > '2.6'