File: variables.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 (67 lines) | stat: -rw-r--r-- 2,371 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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67

# These tests don't run on vanilla because ssh-askpass wants to run for
# whatever reason.

- name: integration/ssh/variables.yml
  hosts: test-targets[0]
  connection: local
  vars:
    ansible_python_interpreter: "{{ ansible_playbook_python }}"
    # ControlMaster has the effect of caching the previous auth to the same
    # account, so disable it. Can't disable with ControlMaster no since that
    # already appears on command line, so override ControlPath with junk.
    ansible_ssh_common_args: |
      -o "ControlPath /tmp/mitogen-ansible-test-{{18446744073709551615|random}}"

  tasks:
    - include_tasks: ../_mitogen_only.yml

    - name: ansible_user, ansible_ssh_private_key_file
      shell: >
        ANSIBLE_ANY_ERRORS_FATAL=false
        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 -a whoami
        {% for inv in ansible_inventory_sources %}
        -i "{{ inv }}"
        {% endfor %}
        test-targets
        -e ansible_user=mitogen__has_sudo_pubkey
        -e ansible_ssh_private_key_file=../data/docker/mitogen__has_sudo_pubkey.key
      args:
        chdir: ../..
      register: out
      changed_when: false

    - name: ansible_user, wrong ansible_ssh_private_key_file
      shell: >
        ANSIBLE_ANY_ERRORS_FATAL=false
        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 -a whoami
        {% for inv in ansible_inventory_sources %}
        -i "{{ inv }}"
        {% endfor %}
        test-targets
        -e ansible_user=mitogen__has_sudo
        -e ansible_ssh_private_key_file=/dev/null
        -e ansible_python_interpreter=python3000
      args:
        chdir: ../..
      register: out
      changed_when: false
      ignore_errors: true

    - assert:
        that:
          - out.rc == 4  # ansible.executor.task_queue_manager.TaskQueueManager.RUN_UNREACHABLE_HOSTS
        fail_msg: |
          out={{ out }}
  tags:
    - mitogen_only