ansible: add test to ensure UNIX socket is cleaned on exit; closes #488.

This commit is contained in:
David Wilson 2019-01-27 19:29:16 +00:00
parent 628e8f4466
commit b254051416
3 changed files with 30 additions and 0 deletions

View File

@ -14,6 +14,7 @@
- include: local/all.yml
- include: module_utils/all.yml
- include: playbook_semantics/all.yml
- include: process/all.yml
- include: runner/all.yml
- include: ssh/all.yml
- include: strategy/all.yml

View File

@ -0,0 +1 @@
- include: "unix_socket_cleanup.yml"

View File

@ -0,0 +1,28 @@
- hosts: test-targets[0]
tasks:
- mitogen_action_script:
script: |
import glob
result['sockets'] = glob.glob('/tmp/mitogen_unix*.sock')
register: socks
- shell: >
ANSIBLE_STRATEGY=mitogen_linear
ANSIBLE_SSH_ARGS=""
ansible -m shell -c local -a whoami -i "{{MITOGEN_INVENTORY_FILE}}" test-targets
args:
chdir: ../..
register: out
connection: local
when: is_mitogen
- mitogen_action_script:
script: |
import glob
result['sockets'] = glob.glob('/tmp/mitogen_unix*.sock')
register: socks2
- assert_equal:
left: socks
right: socks2