|
|
|
@ -13,9 +13,9 @@
|
|
|
|
|
-o "ControlPath /tmp/mitogen-ansible-test-{{18446744073709551615|random}}"
|
|
|
|
|
|
|
|
|
|
tasks:
|
|
|
|
|
- name: ansible_ssh_user
|
|
|
|
|
# Remaining tests just use "ansible_user".
|
|
|
|
|
- name: ansible_ssh_user, ansible_ssh_pass
|
|
|
|
|
shell: >
|
|
|
|
|
ANSIBLE_ANY_ERRORS_FATAL=false
|
|
|
|
|
ANSIBLE_STRATEGY=mitogen_linear
|
|
|
|
|
ANSIBLE_SSH_ARGS=""
|
|
|
|
|
ansible -m shell -a whoami -i "{{MITOGEN_INVENTORY_FILE}}" test-targets
|
|
|
|
@ -26,7 +26,9 @@
|
|
|
|
|
register: out
|
|
|
|
|
when: is_mitogen
|
|
|
|
|
|
|
|
|
|
- shell: >
|
|
|
|
|
- name: ansible_ssh_user, wrong ansible_ssh_pass
|
|
|
|
|
shell: >
|
|
|
|
|
ANSIBLE_ANY_ERRORS_FATAL=false
|
|
|
|
|
ANSIBLE_STRATEGY=mitogen_linear
|
|
|
|
|
ANSIBLE_SSH_ARGS=""
|
|
|
|
|
ansible -m shell -a whoami -i "{{MITOGEN_INVENTORY_FILE}}" test-targets
|
|
|
|
@ -39,13 +41,15 @@
|
|
|
|
|
when: is_mitogen
|
|
|
|
|
|
|
|
|
|
- assert:
|
|
|
|
|
that: out.rc == 4 # unreachable
|
|
|
|
|
that:
|
|
|
|
|
- out.rc == 4 # ansible.executor.task_queue_manager.TaskQueueManager.RUN_UNREACHABLE_HOSTS
|
|
|
|
|
fail_msg: out={{out}}
|
|
|
|
|
when: is_mitogen
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- name: ansible_ssh_pass
|
|
|
|
|
- name: ansible_user, ansible_ssh_pass
|
|
|
|
|
shell: >
|
|
|
|
|
ANSIBLE_ANY_ERRORS_FATAL=false
|
|
|
|
|
ANSIBLE_STRATEGY=mitogen_linear
|
|
|
|
|
ANSIBLE_SSH_ARGS=""
|
|
|
|
|
ansible -m shell -a whoami -i "{{MITOGEN_INVENTORY_FILE}}" test-targets
|
|
|
|
@ -56,7 +60,9 @@
|
|
|
|
|
register: out
|
|
|
|
|
when: is_mitogen
|
|
|
|
|
|
|
|
|
|
- shell: >
|
|
|
|
|
- name: ansible_user, wrong ansible_ssh_pass
|
|
|
|
|
shell: >
|
|
|
|
|
ANSIBLE_ANY_ERRORS_FATAL=false
|
|
|
|
|
ANSIBLE_STRATEGY=mitogen_linear
|
|
|
|
|
ANSIBLE_SSH_ARGS=""
|
|
|
|
|
ansible -m shell -a whoami -i "{{MITOGEN_INVENTORY_FILE}}" test-targets
|
|
|
|
@ -69,13 +75,15 @@
|
|
|
|
|
when: is_mitogen
|
|
|
|
|
|
|
|
|
|
- assert:
|
|
|
|
|
that: out.rc == 4 # unreachable
|
|
|
|
|
that:
|
|
|
|
|
- out.rc == 4 # ansible.executor.task_queue_manager.TaskQueueManager.RUN_UNREACHABLE_HOSTS
|
|
|
|
|
fail_msg: out={{out}}
|
|
|
|
|
when: is_mitogen
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- name: ansible_password
|
|
|
|
|
- name: ansible_user, ansible_password
|
|
|
|
|
shell: >
|
|
|
|
|
ANSIBLE_ANY_ERRORS_FATAL=false
|
|
|
|
|
ANSIBLE_STRATEGY=mitogen_linear
|
|
|
|
|
ANSIBLE_SSH_ARGS=""
|
|
|
|
|
ansible -m shell -a whoami -i "{{MITOGEN_INVENTORY_FILE}}" test-targets
|
|
|
|
@ -86,7 +94,9 @@
|
|
|
|
|
register: out
|
|
|
|
|
when: is_mitogen
|
|
|
|
|
|
|
|
|
|
- shell: >
|
|
|
|
|
- name: ansible_user, wrong ansible_password
|
|
|
|
|
shell: >
|
|
|
|
|
ANSIBLE_ANY_ERRORS_FATAL=false
|
|
|
|
|
ANSIBLE_STRATEGY=mitogen_linear
|
|
|
|
|
ANSIBLE_SSH_ARGS=""
|
|
|
|
|
ansible -m shell -a whoami -i "{{MITOGEN_INVENTORY_FILE}}" test-targets
|
|
|
|
@ -99,18 +109,20 @@
|
|
|
|
|
when: is_mitogen
|
|
|
|
|
|
|
|
|
|
- assert:
|
|
|
|
|
that: out.rc == 4 # unreachable
|
|
|
|
|
that:
|
|
|
|
|
- out.rc == 4 # ansible.executor.task_queue_manager.TaskQueueManager.RUN_UNREACHABLE_HOSTS
|
|
|
|
|
fail_msg: out={{out}}
|
|
|
|
|
when: is_mitogen
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- name: ansible_ssh_private_key_file
|
|
|
|
|
- name: setup ansible_ssh_private_key_file
|
|
|
|
|
shell: chmod 0600 ../data/docker/mitogen__has_sudo_pubkey.key
|
|
|
|
|
args:
|
|
|
|
|
chdir: ../..
|
|
|
|
|
|
|
|
|
|
- name: ansible_ssh_private_key_file
|
|
|
|
|
- name: ansible_user, ansible_ssh_private_key_file
|
|
|
|
|
shell: >
|
|
|
|
|
ANSIBLE_ANY_ERRORS_FATAL=false
|
|
|
|
|
ANSIBLE_STRATEGY=mitogen_linear
|
|
|
|
|
ANSIBLE_SSH_ARGS=""
|
|
|
|
|
ansible -m shell -a whoami -i "{{MITOGEN_INVENTORY_FILE}}" test-targets
|
|
|
|
@ -121,7 +133,9 @@
|
|
|
|
|
register: out
|
|
|
|
|
when: is_mitogen
|
|
|
|
|
|
|
|
|
|
- shell: >
|
|
|
|
|
- name: ansible_user, wrong ansible_ssh_private_key_file
|
|
|
|
|
shell: >
|
|
|
|
|
ANSIBLE_ANY_ERRORS_FATAL=false
|
|
|
|
|
ANSIBLE_STRATEGY=mitogen_linear
|
|
|
|
|
ANSIBLE_SSH_ARGS=""
|
|
|
|
|
ansible -m shell -a whoami -i "{{MITOGEN_INVENTORY_FILE}}" test-targets
|
|
|
|
@ -134,6 +148,7 @@
|
|
|
|
|
when: is_mitogen
|
|
|
|
|
|
|
|
|
|
- assert:
|
|
|
|
|
that: out.rc == 4 # unreachable
|
|
|
|
|
that:
|
|
|
|
|
- out.rc == 4 # ansible.executor.task_queue_manager.TaskQueueManager.RUN_UNREACHABLE_HOSTS
|
|
|
|
|
fail_msg: out={{out}}
|
|
|
|
|
when: is_mitogen
|
|
|
|
|