mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
83 lines
2 KiB
YAML
83 lines
2 KiB
YAML
- set_fact:
|
|
virtualenv: "{{ remote_tmp_dir }}/virtualenv"
|
|
virtualenv_command: "{{ ansible_python_interpreter }} -m virtualenv"
|
|
|
|
- set_fact:
|
|
virtualenv_interpreter: "{{ virtualenv }}/bin/python"
|
|
|
|
- pip:
|
|
name: virtualenv
|
|
|
|
# Test graceful failure for missing kubernetes-validate
|
|
|
|
- pip:
|
|
name:
|
|
- openshift==0.8.1
|
|
virtualenv: "{{ virtualenv }}"
|
|
virtualenv_command: "{{ virtualenv_command }}"
|
|
virtualenv_site_packages: yes
|
|
|
|
- include_tasks: validate_not_installed.yml
|
|
vars:
|
|
ansible_python_interpreter: "{{ virtualenv_interpreter }}"
|
|
|
|
- file:
|
|
path: "{{ virtualenv }}"
|
|
state: absent
|
|
|
|
# Test validate with kubernetes-validate
|
|
|
|
- pip:
|
|
name:
|
|
- openshift==0.8.1
|
|
- kubernetes-validate==1.12.0
|
|
virtualenv: "{{ virtualenv }}"
|
|
virtualenv_command: "{{ virtualenv_command }}"
|
|
virtualenv_site_packages: yes
|
|
|
|
- include_tasks: validate_installed.yml
|
|
vars:
|
|
ansible_python_interpreter: "{{ virtualenv_interpreter }}"
|
|
playbook_namespace: ansible-test-k8s-validate
|
|
|
|
- file:
|
|
path: "{{ virtualenv }}"
|
|
state: absent
|
|
|
|
# Test graceful failure for older versions of openshift
|
|
|
|
- pip:
|
|
name:
|
|
- openshift==0.6.0
|
|
- kubernetes==6.0.0
|
|
virtualenv: "{{ virtualenv }}"
|
|
virtualenv_command: "{{ virtualenv_command }}"
|
|
virtualenv_site_packages: yes
|
|
|
|
- include_tasks: older_openshift_fail.yml
|
|
vars:
|
|
ansible_python_interpreter: "{{ virtualenv_interpreter }}"
|
|
recreate_crd_default_merge_expectation: recreate_crd is failed
|
|
playbook_namespace: ansible-test-k8s-older-openshift
|
|
|
|
- file:
|
|
path: "{{ virtualenv }}"
|
|
state: absent
|
|
|
|
# Run full test suite
|
|
|
|
- pip:
|
|
name:
|
|
- openshift==0.8.1
|
|
virtualenv: "{{ virtualenv }}"
|
|
virtualenv_command: "{{ virtualenv_command }}"
|
|
virtualenv_site_packages: yes
|
|
|
|
- include_tasks: full_test.yml
|
|
vars:
|
|
ansible_python_interpreter: "{{ virtualenv_interpreter }}"
|
|
playbook_namespace: ansible-test-k8s-full
|
|
|
|
- file:
|
|
path: "{{ virtualenv }}"
|
|
state: absent
|