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.
|
|
|
# issue #369: Connection.reset() should cause destruction of the remote
|
|
|
|
# interpreter and any children.
|
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
|
- name: integration/connection/reset.yml
|
|
|
|
hosts: test-targets
|
|
|
|
tasks:
|
|
|
|
- meta: end_play
|
|
|
|
when: not is_mitogen
|
|
|
|
|
|
|
|
- debug: msg="reset.yml skipped on Ansible<2.5.6"
|
|
|
|
when: ansible_version.full < '2.5.6'
|
|
|
|
|
|
|
|
- meta: end_play
|
|
|
|
when: ansible_version.full < '2.5.6'
|
|
|
|
|
|
|
|
- custom_python_detect_environment:
|
|
|
|
register: out
|
|
|
|
|
|
|
|
- custom_python_detect_environment:
|
|
|
|
become: true
|
|
|
|
register: out_become
|
|
|
|
|
|
|
|
- meta: reset_connection
|
|
|
|
|
|
|
|
- custom_python_detect_environment:
|
|
|
|
register: out2
|
|
|
|
|
|
|
|
- custom_python_detect_environment:
|
|
|
|
register: out_become2
|
|
|
|
|
|
|
|
- assert:
|
|
|
|
that:
|
|
|
|
# Interpreter PID has changed.
|
|
|
|
- out.pid != out2.pid
|
|
|
|
|
|
|
|
# SSH PID has changed.
|
|
|
|
- out.ppid != out2.ppid
|
|
|
|
|
|
|
|
# Interpreter PID has changed.
|
|
|
|
- out_become.pid != out_become2.pid
|
|
|
|
|
|
|
|
# sudo PID has changed.
|
|
|
|
- out_become.ppid != out_become2.ppid
|
|
|
|
fail_msg: out={{out}} out2={{out2}} out_become={{out_become}} out_become2={{out_become2}}
|