Files
kubernetes.core/tests/integration/targets/kubernetes/tasks/main.yml
Mike Graves 01a0815e56 Replace openshift client with kubernetes client (#96)
* Replace openshift client with kubernetes client

This commit primarily just removes mentions of openshift from the docs
and updates the requirements. Most of the work to replace the client has
been done through the following commits:

edc48ee577
c214376cac
48c5170018
2b6a989cf9

* Add changelog fragment

* Update changelogs/fragments/96-replace-openshift-client.yaml

Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>

* Update plugins/modules/k8s.py

Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>

* Update plugins/modules/k8s_info.py

Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>

* Update plugins/modules/k8s_service.py

Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>

* Bump minimum kubernetes version to 12.0.0

Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
2021-05-06 14:44:17 -04:00

77 lines
1.8 KiB
YAML

---
- include_tasks: setup_remote_tmp_dir.yml
- set_fact:
virtualenv: "{{ remote_tmp_dir }}/virtualenv"
virtualenv_command: "{{ ansible_python_interpreter }} -m venv"
- set_fact:
virtualenv_interpreter: "{{ virtualenv }}/bin/python"
# Test graceful failure for missing kubernetes-validate
- pip:
name:
- kubernetes>=12.0.0
- coverage>=5.3
virtualenv: "{{ virtualenv }}"
virtualenv_command: "{{ virtualenv_command }}"
virtualenv_site_packages: no
- include_tasks: validate_not_installed.yml
vars:
ansible_python_interpreter: "{{ virtualenv_interpreter }}"
- file:
path: "{{ virtualenv }}"
state: absent
no_log: yes
# Test validate with kubernetes-validate
- pip:
name:
- kubernetes-validate==1.12.0
- kubernetes>=12.0.0
- coverage>=5.3
virtualenv: "{{ virtualenv }}"
virtualenv_command: "{{ virtualenv_command }}"
virtualenv_site_packages: no
- include_tasks: validate_installed.yml
vars:
ansible_python_interpreter: "{{ virtualenv_interpreter }}"
playbook_namespace: ansible-test-k8s-validate
- file:
path: "{{ virtualenv }}"
state: absent
no_log: yes
# Test new config getter (kubernetes==12.0.0)
- pip:
name:
- kubernetes==12.0.0
- coverage>=5.3
virtualenv: "{{ virtualenv }}"
virtualenv_command: "{{ virtualenv_command }}"
virtualenv_site_packages: no
- pip:
name:
- kubernetes>=12.0.0
virtualenv: "{{ virtualenv }}"
virtualenv_command: "{{ virtualenv_command }}"
virtualenv_site_packages: no
- include_tasks: new_config_getter.yml
vars:
ansible_python_interpreter: "{{ virtualenv_interpreter }}"
playbook_namespace: ansible-test-k8s-config-getter
- file:
path: "{{ virtualenv }}"
state: absent
no_log: yes