# 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: # 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: - name: setup ansible_ssh_private_key_file shell: chmod 0600 ../data/docker/mitogen__has_sudo_pubkey.key args: chdir: ../.. - name: ansible_user, ansible_ssh_private_key_file shell: > ANSIBLE_ANY_ERRORS_FATAL=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 - name: ansible_user, wrong ansible_ssh_private_key_file shell: > ANSIBLE_ANY_ERRORS_FATAL=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 ignore_errors: true - assert: that: - out.rc == 4 # ansible.executor.task_queue_manager.TaskQueueManager.RUN_UNREACHABLE_HOSTS fail_msg: | out={{ out }} tags: - mitogen_only