You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
|
|
|
|
- name: integration/stub_connections/kubectl.yml
|
|
|
|
hosts: test-targets
|
|
|
|
gather_facts: false
|
|
|
|
any_errors_fatal: true
|
|
|
|
tasks:
|
|
|
|
- meta: end_play
|
|
|
|
when: not is_mitogen
|
|
|
|
|
|
|
|
- meta: end_play
|
|
|
|
when: ansible_version.full < '2.5'
|
|
|
|
|
|
|
|
- custom_python_detect_environment:
|
|
|
|
vars:
|
|
|
|
ansible_connection: kubectl
|
Use virtualenv Python for stub connections to workaround problem
../data/stubs/stub-kubectl.py exec -it localhost -- /usr/bin/python -c "...":
Traceback (most recent call last):
File "<string>", line 1, in <module>
LookupError: unknown encoding: base64
It's not clear why this is happening. "stub-kubectl.py" is executed with
the 2.7 virtualenv, while the exec() that happens inside stub-kubectl
was for "/usr/bin/python".
That second Python can't find chunks of its stdlib:
stat("/usr/lib/python2.7/encodings/base64", 0x7ffde8744c60) = -1 ENOENT (No such file or directory)
open("/usr/lib/python2.7/encodings/base64.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/python2.7/encodings/base64module.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/python2.7/encodings/base64.py", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/python2.7/encodings/base64.pyc", O_RDONLY) = -1 ENOENT (No such file or directory)
write(2, "Traceback (most recent call last):\n", 35) = 35
write(2, " File \"<string>\", line 1, in <module>\n", 39) = 39
5 years ago
|
|
|
ansible_python_interpreter: python # avoid Travis virtualenv breakage
|
|
|
|
mitogen_kubectl_path: stub-kubectl.py
|
|
|
|
register: out
|
|
|
|
|
|
|
|
- assert:
|
|
|
|
that:
|
|
|
|
- out.env.THIS_IS_STUB_KUBECTL == '1'
|