2019-03-15 20:37:46 +01:00
|
|
|
- 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:
|
2019-09-19 05:30:31 +02:00
|
|
|
- openshift>=0.9.2
|
2019-05-30 01:26:43 +02:00
|
|
|
- coverage
|
2019-03-15 20:37:46 +01:00
|
|
|
virtualenv: "{{ virtualenv }}"
|
|
|
|
virtualenv_command: "{{ virtualenv_command }}"
|
2019-05-30 01:26:43 +02:00
|
|
|
virtualenv_site_packages: no
|
2019-03-15 20:37:46 +01:00
|
|
|
|
|
|
|
- include_tasks: validate_not_installed.yml
|
|
|
|
vars:
|
|
|
|
ansible_python_interpreter: "{{ virtualenv_interpreter }}"
|
|
|
|
|
|
|
|
- file:
|
|
|
|
path: "{{ virtualenv }}"
|
|
|
|
state: absent
|
2019-09-19 05:30:31 +02:00
|
|
|
no_log: yes
|
2019-03-15 20:37:46 +01:00
|
|
|
|
|
|
|
# Test validate with kubernetes-validate
|
|
|
|
|
|
|
|
- pip:
|
|
|
|
name:
|
|
|
|
- kubernetes-validate==1.12.0
|
2019-09-19 05:30:31 +02:00
|
|
|
- openshift>=0.9.2
|
2019-05-30 01:26:43 +02:00
|
|
|
- coverage
|
2019-03-15 20:37:46 +01:00
|
|
|
virtualenv: "{{ virtualenv }}"
|
|
|
|
virtualenv_command: "{{ virtualenv_command }}"
|
2019-05-30 01:26:43 +02:00
|
|
|
virtualenv_site_packages: no
|
2019-03-15 20:37:46 +01:00
|
|
|
|
|
|
|
- include_tasks: validate_installed.yml
|
|
|
|
vars:
|
|
|
|
ansible_python_interpreter: "{{ virtualenv_interpreter }}"
|
|
|
|
playbook_namespace: ansible-test-k8s-validate
|
|
|
|
|
|
|
|
- file:
|
|
|
|
path: "{{ virtualenv }}"
|
|
|
|
state: absent
|
2019-09-19 05:30:31 +02:00
|
|
|
no_log: yes
|
2019-03-15 20:37:46 +01:00
|
|
|
|
|
|
|
# Test graceful failure for older versions of openshift
|
|
|
|
|
|
|
|
- pip:
|
|
|
|
name:
|
|
|
|
- openshift==0.6.0
|
|
|
|
- kubernetes==6.0.0
|
2019-05-30 01:26:43 +02:00
|
|
|
- coverage
|
2019-03-15 20:37:46 +01:00
|
|
|
virtualenv: "{{ virtualenv }}"
|
|
|
|
virtualenv_command: "{{ virtualenv_command }}"
|
2019-05-30 01:26:43 +02:00
|
|
|
virtualenv_site_packages: no
|
2019-03-15 20:37:46 +01:00
|
|
|
|
|
|
|
- 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
|
2019-09-19 05:30:31 +02:00
|
|
|
no_log: yes
|
2019-03-15 20:37:46 +01:00
|
|
|
|
|
|
|
# Run full test suite
|
|
|
|
|
|
|
|
- pip:
|
|
|
|
name:
|
2019-09-19 05:30:31 +02:00
|
|
|
- openshift>=0.9.2
|
2019-05-30 01:26:43 +02:00
|
|
|
- coverage
|
2019-03-15 20:37:46 +01:00
|
|
|
virtualenv: "{{ virtualenv }}"
|
|
|
|
virtualenv_command: "{{ virtualenv_command }}"
|
2019-05-30 01:26:43 +02:00
|
|
|
virtualenv_site_packages: no
|
2019-03-15 20:37:46 +01:00
|
|
|
|
|
|
|
- include_tasks: full_test.yml
|
|
|
|
vars:
|
|
|
|
ansible_python_interpreter: "{{ virtualenv_interpreter }}"
|
2019-07-08 22:47:41 +02:00
|
|
|
create_crd_with_apply: no
|
2019-03-15 20:37:46 +01:00
|
|
|
playbook_namespace: ansible-test-k8s-full
|
|
|
|
|
|
|
|
- file:
|
|
|
|
path: "{{ virtualenv }}"
|
|
|
|
state: absent
|
2019-09-19 05:30:31 +02:00
|
|
|
no_log: yes
|