diff options
author | Matt Clay <matt@mystile.com> | 2019-03-28 15:09:17 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-03-28 15:09:17 -0700 |
commit | 2434abaaf73bbcc58f869cd0963767277fd50036 (patch) | |
tree | c8d45b208e4a2ae5e35ec9ede72f934e9c664afe /test/integration/targets/pip/tasks | |
parent | 6167ab125c5af98e05393c3af802753798603bf9 (diff) | |
download | ansible-2434abaaf73bbcc58f869cd0963767277fd50036.tar.gz |
Fix git test on FreeBSD with Python 3.x. (#54560)
Diffstat (limited to 'test/integration/targets/pip/tasks')
-rw-r--r-- | test/integration/targets/pip/tasks/main.yml | 23 | ||||
-rw-r--r-- | test/integration/targets/pip/tasks/pip.yml | 8 |
2 files changed, 23 insertions, 8 deletions
diff --git a/test/integration/targets/pip/tasks/main.yml b/test/integration/targets/pip/tasks/main.yml index d81d103559..d796d13b81 100644 --- a/test/integration/targets/pip/tasks/main.yml +++ b/test/integration/targets/pip/tasks/main.yml @@ -10,7 +10,28 @@ set_fact: virtualenv: "{{ command.stdout_lines[0] }}" -- include: 'pip.yml' +- block: + - name: install git, needed for repo installs + package: + name: git + state: present + when: ansible_distribution != "MacOSX" + register: git_install + + - include_tasks: pip.yml + always: + - name: remove unwanted packages + package: + name: git + state: absent + when: git_install.changed + + - name: remove auto-installed packages from FreeBSD + pkgng: + name: git + state: absent + autoremove: yes + when: git_install.changed and ansible_distribution == "FreeBSD" when: ansible_fips|bool != True module_defaults: pip: diff --git a/test/integration/targets/pip/tasks/pip.yml b/test/integration/targets/pip/tasks/pip.yml index 78b0b9cd50..3ff453289c 100644 --- a/test/integration/targets/pip/tasks/pip.yml +++ b/test/integration/targets/pip/tasks/pip.yml @@ -18,12 +18,6 @@ # FIXME: replace the python test package -- name: install git, needed for repo installs - package: - name: git - state: present - when: ansible_distribution != "MacOSX" - # first some tests installed system-wide # verify things were not installed to start with @@ -139,7 +133,7 @@ - "not (req_installed is changed)" - name: install the same module from url - pip: + pip: name: "git+https://github.com/dvarrazzo/pyiso8601#egg=pyiso8601" virtualenv: "{{ output_dir }}/pipenv" editable: True |