File: unix_socket_cleanup.yml

package info (click to toggle)
python-mitogen 0.3.26-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 6,456 kB
  • sloc: python: 22,134; sh: 183; makefile: 74; perl: 19; ansic: 18
file content (41 lines) | stat: -rw-r--r-- 1,201 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
- name: integration/process/unix_socket_cleanup.yml
  hosts: test-targets[0]
  tasks:
  - mitogen_action_script:
      script: |
        import glob
        result['sockets'] = glob.glob('/tmp/mitogen_unix*.sock')
    register: socks

  - name: Run whoami locally in an ansible subprocess
    vars:
      ansible_python_interpreter: "{{ ansible_playbook_python }}"
    shell: >-
      ANSIBLE_CALLBACK_RESULT_FORMAT=json
      ANSIBLE_LOAD_CALLBACK_PLUGINS=false
      ANSIBLE_STRATEGY=mitogen_linear
      ANSIBLE_SSH_ARGS="-o HostKeyAlgorithms=+ssh-rsa -o PubkeyAcceptedKeyTypes=+ssh-rsa"
      ANSIBLE_VERBOSITY="{{ ansible_verbosity }}"
      ansible -m shell -c local -a whoami
      {% for inv in ansible_inventory_sources %}
      -i "{{ inv }}"
      {% endfor %}
      -e ansible_python_interpreter="{{ ansible_playbook_python }}"
      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
  tags:
    - custom_python_new_style_module