Merge pull request #1060 from moreati/issue1059

Speed up test suite
pull/1072/head^2
Alex Willmer 6 months ago committed by GitHub
commit 23d9d0bc82
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -247,6 +247,15 @@ Noteworthy Differences
part of the core library, and should therefore be straightforward to fix as part of the core library, and should therefore be straightforward to fix as
part of 0.2.x. part of 0.2.x.
* Connection and become timeouts are applied differently. Mitogen may consider
a connection to have timed out, when Ansible would have waited longer or
indefinately. For example if SSH authentication completes within the
timeout, but execution of login scripts exceeds it - then Mitogen will
consider the task to have timed out and that host to have failed.
..
tests/ansible/integration/ssh/timeouts.yml covers (some of) this behaviour.
.. ..
* SSH and ``become`` are treated distinctly when applying timeouts, and * SSH and ``become`` are treated distinctly when applying timeouts, and
timeouts apply up to the point when the new interpreter is ready to accept timeouts apply up to the point when the new interpreter is ready to accept

@ -1,14 +1,16 @@
- name: bench/file_transfer.yml - name: bench/file_transfer.yml
hosts: test-targets hosts: test-targets
tasks: tasks:
- name: Make 32MiB file - name: Make 32MiB file
delegate_to: localhost delegate_to: localhost
run_once: true
shell: openssl rand 33554432 > /tmp/bigfile.in shell: openssl rand 33554432 > /tmp/bigfile.in
args:
creates: /tmp/bigfile.in
- name: Make 320MiB file - name: Make 320MiB file
delegate_to: localhost delegate_to: localhost
run_once: true
shell: > shell: >
cat cat
/tmp/bigfile.in /tmp/bigfile.in
@ -22,6 +24,8 @@
/tmp/bigfile.in /tmp/bigfile.in
/tmp/bigfile.in /tmp/bigfile.in
> /tmp/bigbigfile.in > /tmp/bigbigfile.in
args:
creates: /tmp/bigbigfile.in
- name: Delete SSH file is present. - name: Delete SSH file is present.
file: file:
@ -36,17 +40,20 @@
copy: copy:
src: /tmp/bigfile.in src: /tmp/bigfile.in
dest: /tmp/bigfile.out dest: /tmp/bigfile.out
mode: ugo=rw
- name: Copy 320MiB file via SSH - name: Copy 320MiB file via SSH
copy: copy:
src: /tmp/bigbigfile.in src: /tmp/bigbigfile.in
dest: /tmp/bigbigfile.out dest: /tmp/bigbigfile.out
mode: ugo=rw
- name: Delete localhost sudo file if present. - name: Delete localhost sudo file if present.
file: file:
path: "{{item}}" path: "{{item}}"
state: absent state: absent
delegate_to: localhost delegate_to: localhost
run_once: true
become: true become: true
with_items: with_items:
- /tmp/bigfile.out - /tmp/bigfile.out
@ -56,21 +63,51 @@
- name: Copy 32MiB file via localhost sudo - name: Copy 32MiB file via localhost sudo
delegate_to: localhost delegate_to: localhost
run_once: true
become: true become: true
copy: copy:
src: /tmp/bigfile.in src: /tmp/bigfile.in
dest: /tmp/bigfile.out dest: /tmp/bigfile.out
mode: ugo=rw
tags: tags:
- requires_local_sudo - requires_local_sudo
- name: Copy 320MiB file via localhost sudo - name: Copy 320MiB file via localhost sudo
delegate_to: localhost delegate_to: localhost
run_once: true
become: true become: true
copy: copy:
src: /tmp/bigbigfile.in src: /tmp/bigbigfile.in
dest: /tmp/bigbigfile.out dest: /tmp/bigbigfile.out
mode: ugo=rw
tags: tags:
- requires_local_sudo - requires_local_sudo
- name: Local cleanup
file:
path: "{{ item.path }}"
state: absent
loop:
- /tmp/bigfile.in
- /tmp/bigfile.out
- /tmp/bigbigfile.in
- /tmp/bigbigfile.out
delegate_to: localhost
run_once: true
tags:
- cleanup_local
- cleanup
- name: Target cleanup
file:
path: "{{ item.path }}"
state: absent
loop:
- /tmp/bigfile.out
- /tmp/bigbigfile.out
tags:
- cleanup_target
- cleanup
tags: tags:
- resource_intensive - resource_intensive

@ -9,6 +9,7 @@
content: content:
this is a tiny file. this is a tiny file.
delegate_to: localhost delegate_to: localhost
run_once: true
- name: Create large file - name: Create large file
copy: copy:
@ -16,6 +17,7 @@
# Must be larger than Connection.SMALL_SIZE_LIMIT. # Must be larger than Connection.SMALL_SIZE_LIMIT.
content: "{% for x in range(200000) %}x{% endfor %}" content: "{% for x in range(200000) %}x{% endfor %}"
delegate_to: localhost delegate_to: localhost
run_once: true
- name: Cleanup copied files - name: Cleanup copied files
file: file:

@ -38,6 +38,7 @@
- name: Create local weird mode file - name: Create local weird mode file
delegate_to: localhost delegate_to: localhost
run_once: true
copy: copy:
content: "weird mode" content: "weird mode"
dest: "/tmp/weird-mode" dest: "/tmp/weird-mode"

@ -24,18 +24,21 @@
path: /tmp/sync-test path: /tmp/sync-test
state: absent state: absent
delegate_to: localhost delegate_to: localhost
run_once: true
- name: Create sync-test - name: Create sync-test
file: file:
path: /tmp/sync-test path: /tmp/sync-test
state: directory state: directory
delegate_to: localhost delegate_to: localhost
run_once: true
- name: Create syn-test item - name: Create syn-test item
copy: copy:
dest: /tmp/sync-test/item dest: /tmp/sync-test/item
content: "item!" content: "item!"
delegate_to: localhost delegate_to: localhost
run_once: true
# TODO: https://github.com/dw/mitogen/issues/692 # TODO: https://github.com/dw/mitogen/issues/692
# - file: # - file:

@ -0,0 +1,17 @@
- name: Cleanup local file
file:
path: /tmp/{{ file_name }}
state: absent
delegate_to: localhost
run_once: true
tags:
- cleanup_local
- cleanup
- name: Cleanup target file
file:
path: /tmp/{{ file_name }}.out
state: absent
tags:
- cleanup_target
- cleanup

@ -1,20 +1,21 @@
---
- name: Create {{ file_name }} - name: Create {{ file_name }}
shell: dd if=/dev/urandom of=/tmp/{{ file_name }} bs=1024 count={{ file_size }} command:
args: cmd: dd if=/dev/urandom of=/tmp/{{ file_name }} bs=1024 count={{ file_size_kib }}
creates: /tmp/{{file_name}} creates: /tmp/{{file_name}}
delegate_to: localhost delegate_to: localhost
run_once: true
- name: Copy {{ file_name }} - name: Copy {{ file_name }}
copy: copy:
dest: /tmp/{{file_name}}.out dest: /tmp/{{file_name}}.out
src: /tmp/{{file_name}} src: /tmp/{{file_name}}
mode: "{{ file_mode }}"
- name: Stat created {{ file_name }} - name: Stat created {{ file_name }}
stat: path=/tmp/{{ file_name }} stat: path=/tmp/{{ file_name }}
register: original register: original
delegate_to: localhost delegate_to: localhost
run_once: true
- name: Stat copied {{ file_name }} - name: Stat copied {{ file_name }}
stat: path=/tmp/{{ file_name }}.out stat: path=/tmp/{{ file_name }}.out

@ -10,6 +10,8 @@
- name: Run _disconnect_during_module.yml - name: Run _disconnect_during_module.yml
delegate_to: localhost delegate_to: localhost
environment:
ANSIBLE_VERBOSITY: "{{ ansible_verbosity }}"
command: | command: |
ansible-playbook ansible-playbook
{% for inv in ansible_inventory_sources %} {% for inv in ansible_inventory_sources %}

@ -6,9 +6,11 @@
gather_facts: no gather_facts: no
vars: vars:
file_name: large-file file_name: large-file
file_size: 512 file_size_kib: 512
file_mode: u=rw,go=
tasks: tasks:
- include_tasks: _put_file.yml - include_tasks: _put_file.yml
- include_tasks: _cleanup_file.yml
tags: tags:
- put_file - put_file
- put_large_file - put_large_file

@ -6,9 +6,11 @@
gather_facts: no gather_facts: no
vars: vars:
file_name: small-file file_name: small-file
file_size: 123 file_size_kib: 123
file_mode: u=rw,go=
tasks: tasks:
- include_tasks: _put_file.yml - include_tasks: _put_file.yml
- include_tasks: _cleanup_file.yml
tags: tags:
- put_file - put_file
- put_small_file - put_small_file

@ -1,23 +1,27 @@
- name: integration/playbook_semantics/delegate_to.yml - name: integration/playbook_semantics/delegate_to.yml
hosts: test-targets hosts: test-targets
vars:
local_path: "/tmp/delegate_to.{{ inventory_hostname }}.txt"
tasks: tasks:
# #
# delegate_to, no sudo # delegate_to, no sudo
# #
- name: "delegate_to, no sudo" - name: "delegate_to, no sudo"
copy: copy:
dest: /tmp/delegate_to.yml.txt dest: "{{ local_path }}"
content: "Hello, world." content: "Hello, world."
register: out mode: u=rw,go=r
delegate_to: localhost delegate_to: localhost
- name: "delegate_to, no sudo" - name: "delegate_to, no sudo"
assert: assert:
that: "lookup('file', '/tmp/delegate_to.yml.txt') == 'Hello, world.'" that:
- lookup('file', local_path) == 'Hello, world.'
fail_msg: "{{ lookup('file', local_path) }}"
- name: "delegate_to, no sudo" - name: "delegate_to, no sudo"
file: file:
path: /tmp/delegate_to.yml.txt path: "{{ local_path }}"
state: absent state: absent
delegate_to: localhost delegate_to: localhost
@ -27,18 +31,20 @@
# #
- name: "connection:local, no sudo" - name: "connection:local, no sudo"
copy: copy:
dest: /tmp/delegate_to.yml.txt dest: "{{ local_path }}"
content: "Hello, world." content: "Hello, world."
register: out mode: u=rw,go=r
connection: local connection: local
- name: "connection:local, no sudo" - name: "connection:local, no sudo"
assert: assert:
that: "lookup('file', '/tmp/delegate_to.yml.txt') == 'Hello, world.'" that:
- lookup('file', local_path) == 'Hello, world.'
fail_msg: "{{ lookup('file', local_path) }}"
- name: "connection:local, no sudo" - name: "connection:local, no sudo"
file: file:
path: /tmp/delegate_to.yml.txt path: "{{ local_path }}"
state: absent state: absent
connection: local connection: local
@ -47,7 +53,10 @@
# delegate_to, sudo # delegate_to, sudo
# #
- name: "delegate_to, sudo" - name: "delegate_to, sudo"
shell: whoami > /tmp/delegate_to.yml.txt shell: |
whoami > "{{ local_path }}"
args:
creates: "{{ local_path }}"
delegate_to: localhost delegate_to: localhost
become: true become: true
tags: tags:
@ -55,13 +64,15 @@
- name: "delegate_to, sudo" - name: "delegate_to, sudo"
assert: assert:
that: "lookup('file', '/tmp/delegate_to.yml.txt') == 'root'" that:
- lookup('file', local_path) == 'root'
fail_msg: "{{ lookup('file', local_path) }}"
tags: tags:
- requires_local_sudo - requires_local_sudo
- name: "delegate_to, sudo" - name: "delegate_to, sudo"
file: file:
path: /tmp/delegate_to.yml.txt path: "{{ local_path }}"
state: absent state: absent
delegate_to: localhost delegate_to: localhost
become: true become: true
@ -73,7 +84,10 @@
# connection:local, sudo # connection:local, sudo
# #
- name: "connection:local, sudo" - name: "connection:local, sudo"
shell: whoami > /tmp/delegate_to.yml.txt shell: |
whoami > "{{ local_path }}"
args:
creates: "{{ local_path }}"
connection: local connection: local
become: true become: true
tags: tags:
@ -81,13 +95,15 @@
- name: "connection:local, sudo" - name: "connection:local, sudo"
assert: assert:
that: "lookup('file', '/tmp/delegate_to.yml.txt') == 'root'" that:
- lookup('file', local_path) == 'root'
fail_msg: "{{ lookup('file', local_path) }}"
tags: tags:
- requires_local_sudo - requires_local_sudo
- name: "connection:local, sudo" - name: "connection:local, sudo"
file: file:
path: /tmp/delegate_to.yml.txt path: "{{ local_path }}"
state: absent state: absent
connection: local connection: local
become: true become: true

@ -10,6 +10,7 @@
- shell: > - shell: >
ANSIBLE_STRATEGY=mitogen_linear ANSIBLE_STRATEGY=mitogen_linear
ANSIBLE_SSH_ARGS="-o HostKeyAlgorithms=+ssh-rsa -o PubkeyAcceptedKeyTypes=+ssh-rsa" ANSIBLE_SSH_ARGS="-o HostKeyAlgorithms=+ssh-rsa -o PubkeyAcceptedKeyTypes=+ssh-rsa"
ANSIBLE_VERBOSITY="{{ ansible_verbosity }}"
ansible -m shell -c local -a whoami ansible -m shell -c local -a whoami
{% for inv in ansible_inventory_sources %} {% for inv in ansible_inventory_sources %}
-i "{{ inv }}" -i "{{ inv }}"

@ -1,12 +1,13 @@
- name: integration/runner/missing_module.yml - name: integration/runner/missing_module.yml
hosts: test-targets[0] hosts: test-targets[0]
connection: local connection: local
tasks: tasks:
- name: Run missing_module - name: Run missing_module
connection: local connection: local
environment:
ANSIBLE_VERBOSITY: "{{ ansible_verbosity }}"
command: | command: |
ansible -vvv ansible
{% for inv in ansible_inventory_sources %} {% for inv in ansible_inventory_sources %}
-i "{{ inv }}" -i "{{ inv }}"
{% endfor %} {% endfor %}
@ -15,6 +16,8 @@
args: args:
chdir: ../.. chdir: ../..
register: out register: out
changed_when: false
check_mode: false
ignore_errors: true ignore_errors: true
- assert: - assert:

@ -1,7 +1,12 @@
# Ensure 'ssh' connections time out correctly. # Ensure 'ssh' connections time out correctly.
# mitogen__slow_user performs a long sleep in ~/.profile.
# Mitogen counts this time towards the connection timeout. Ansible doesn't.
# ansible_python_interpreter=python3000 is an optimisation, to avoid waiting
# on the timeout multiple times (e.g. interpreter discovery).
- name: integration/ssh/timeouts.yml - name: integration/ssh/timeouts.yml
hosts: test-targets hosts: test-targets
gather_facts: false
tasks: tasks:
- include_tasks: ../_mitogen_only.yml - include_tasks: ../_mitogen_only.yml
@ -9,17 +14,21 @@
connection: local connection: local
environment: environment:
ANSIBLE_SSH_TIMEOUT: 10 ANSIBLE_SSH_TIMEOUT: 10
ANSIBLE_VERBOSITY: "{{ ansible_verbosity }}"
command: | command: |
ansible -vvv ansible
{% for inv in ansible_inventory_sources %} {% for inv in ansible_inventory_sources %}
-i "{{ inv }}" -i "{{ inv }}"
{% endfor %} {% endfor %}
test-targets "{{ inventory_hostname }}"
-m custom_python_detect_environment -m ping
-e ansible_user=mitogen__slow_user -e ansible_password=slow_user_password -e ansible_user=mitogen__slow_user -e ansible_password=slow_user_password
-e ansible_python_interpreter=python3000
args: args:
chdir: ../.. chdir: ../..
register: out register: out
changed_when: false
check_mode: false
ignore_errors: true ignore_errors: true
- name: Verify connection timeout occurred - name: Verify connection timeout occurred

@ -20,6 +20,7 @@
ANSIBLE_ANY_ERRORS_FATAL=false ANSIBLE_ANY_ERRORS_FATAL=false
ANSIBLE_STRATEGY=mitogen_linear ANSIBLE_STRATEGY=mitogen_linear
ANSIBLE_SSH_ARGS="-o HostKeyAlgorithms=+ssh-rsa -o PubkeyAcceptedKeyTypes=+ssh-rsa" ANSIBLE_SSH_ARGS="-o HostKeyAlgorithms=+ssh-rsa -o PubkeyAcceptedKeyTypes=+ssh-rsa"
ANSIBLE_VERBOSITY="{{ ansible_verbosity }}"
ansible -m shell -a whoami ansible -m shell -a whoami
{% for inv in ansible_inventory_sources %} {% for inv in ansible_inventory_sources %}
-i "{{ inv }}" -i "{{ inv }}"
@ -36,6 +37,7 @@
ANSIBLE_ANY_ERRORS_FATAL=false ANSIBLE_ANY_ERRORS_FATAL=false
ANSIBLE_STRATEGY=mitogen_linear ANSIBLE_STRATEGY=mitogen_linear
ANSIBLE_SSH_ARGS="-o HostKeyAlgorithms=+ssh-rsa -o PubkeyAcceptedKeyTypes=+ssh-rsa" ANSIBLE_SSH_ARGS="-o HostKeyAlgorithms=+ssh-rsa -o PubkeyAcceptedKeyTypes=+ssh-rsa"
ANSIBLE_VERBOSITY="{{ ansible_verbosity }}"
ansible -m shell -a whoami ansible -m shell -a whoami
{% for inv in ansible_inventory_sources %} {% for inv in ansible_inventory_sources %}
-i "{{ inv }}" -i "{{ inv }}"
@ -43,6 +45,7 @@
test-targets test-targets
-e ansible_ssh_user=mitogen__has_sudo -e ansible_ssh_user=mitogen__has_sudo
-e ansible_ssh_pass=wrong_password -e ansible_ssh_pass=wrong_password
-e ansible_python_interpreter=python3000
args: args:
chdir: ../.. chdir: ../..
register: out register: out
@ -59,6 +62,7 @@
ANSIBLE_ANY_ERRORS_FATAL=false ANSIBLE_ANY_ERRORS_FATAL=false
ANSIBLE_STRATEGY=mitogen_linear ANSIBLE_STRATEGY=mitogen_linear
ANSIBLE_SSH_ARGS="-o HostKeyAlgorithms=+ssh-rsa -o PubkeyAcceptedKeyTypes=+ssh-rsa" ANSIBLE_SSH_ARGS="-o HostKeyAlgorithms=+ssh-rsa -o PubkeyAcceptedKeyTypes=+ssh-rsa"
ANSIBLE_VERBOSITY="{{ ansible_verbosity }}"
ansible -m shell -a whoami ansible -m shell -a whoami
{% for inv in ansible_inventory_sources %} {% for inv in ansible_inventory_sources %}
-i "{{ inv }}" -i "{{ inv }}"
@ -75,6 +79,7 @@
ANSIBLE_ANY_ERRORS_FATAL=false ANSIBLE_ANY_ERRORS_FATAL=false
ANSIBLE_STRATEGY=mitogen_linear ANSIBLE_STRATEGY=mitogen_linear
ANSIBLE_SSH_ARGS="-o HostKeyAlgorithms=+ssh-rsa -o PubkeyAcceptedKeyTypes=+ssh-rsa" ANSIBLE_SSH_ARGS="-o HostKeyAlgorithms=+ssh-rsa -o PubkeyAcceptedKeyTypes=+ssh-rsa"
ANSIBLE_VERBOSITY="{{ ansible_verbosity }}"
ansible -m shell -a whoami ansible -m shell -a whoami
{% for inv in ansible_inventory_sources %} {% for inv in ansible_inventory_sources %}
-i "{{ inv }}" -i "{{ inv }}"
@ -82,6 +87,7 @@
test-targets test-targets
-e ansible_user=mitogen__has_sudo -e ansible_user=mitogen__has_sudo
-e ansible_ssh_pass=wrong_password -e ansible_ssh_pass=wrong_password
-e ansible_python_interpreter=python3000
args: args:
chdir: ../.. chdir: ../..
register: out register: out
@ -98,6 +104,7 @@
ANSIBLE_ANY_ERRORS_FATAL=false ANSIBLE_ANY_ERRORS_FATAL=false
ANSIBLE_STRATEGY=mitogen_linear ANSIBLE_STRATEGY=mitogen_linear
ANSIBLE_SSH_ARGS="-o HostKeyAlgorithms=+ssh-rsa -o PubkeyAcceptedKeyTypes=+ssh-rsa" ANSIBLE_SSH_ARGS="-o HostKeyAlgorithms=+ssh-rsa -o PubkeyAcceptedKeyTypes=+ssh-rsa"
ANSIBLE_VERBOSITY="{{ ansible_verbosity }}"
ansible -m shell -a whoami ansible -m shell -a whoami
{% for inv in ansible_inventory_sources %} {% for inv in ansible_inventory_sources %}
-i "{{ inv }}" -i "{{ inv }}"
@ -114,6 +121,7 @@
ANSIBLE_ANY_ERRORS_FATAL=false ANSIBLE_ANY_ERRORS_FATAL=false
ANSIBLE_STRATEGY=mitogen_linear ANSIBLE_STRATEGY=mitogen_linear
ANSIBLE_SSH_ARGS="-o HostKeyAlgorithms=+ssh-rsa -o PubkeyAcceptedKeyTypes=+ssh-rsa" ANSIBLE_SSH_ARGS="-o HostKeyAlgorithms=+ssh-rsa -o PubkeyAcceptedKeyTypes=+ssh-rsa"
ANSIBLE_VERBOSITY="{{ ansible_verbosity }}"
ansible -m shell -a whoami ansible -m shell -a whoami
{% for inv in ansible_inventory_sources %} {% for inv in ansible_inventory_sources %}
-i "{{ inv }}" -i "{{ inv }}"
@ -121,6 +129,7 @@
test-targets test-targets
-e ansible_user=mitogen__has_sudo -e ansible_user=mitogen__has_sudo
-e ansible_password=wrong_password -e ansible_password=wrong_password
-e ansible_python_interpreter=python3000
args: args:
chdir: ../.. chdir: ../..
register: out register: out
@ -142,6 +151,7 @@
ANSIBLE_ANY_ERRORS_FATAL=false ANSIBLE_ANY_ERRORS_FATAL=false
ANSIBLE_STRATEGY=mitogen_linear ANSIBLE_STRATEGY=mitogen_linear
ANSIBLE_SSH_ARGS="-o HostKeyAlgorithms=+ssh-rsa -o PubkeyAcceptedKeyTypes=+ssh-rsa" ANSIBLE_SSH_ARGS="-o HostKeyAlgorithms=+ssh-rsa -o PubkeyAcceptedKeyTypes=+ssh-rsa"
ANSIBLE_VERBOSITY="{{ ansible_verbosity }}"
ansible -m shell -a whoami ansible -m shell -a whoami
{% for inv in ansible_inventory_sources %} {% for inv in ansible_inventory_sources %}
-i "{{ inv }}" -i "{{ inv }}"
@ -158,6 +168,7 @@
ANSIBLE_ANY_ERRORS_FATAL=false ANSIBLE_ANY_ERRORS_FATAL=false
ANSIBLE_STRATEGY=mitogen_linear ANSIBLE_STRATEGY=mitogen_linear
ANSIBLE_SSH_ARGS="-o HostKeyAlgorithms=+ssh-rsa -o PubkeyAcceptedKeyTypes=+ssh-rsa" ANSIBLE_SSH_ARGS="-o HostKeyAlgorithms=+ssh-rsa -o PubkeyAcceptedKeyTypes=+ssh-rsa"
ANSIBLE_VERBOSITY="{{ ansible_verbosity }}"
ansible -m shell -a whoami ansible -m shell -a whoami
{% for inv in ansible_inventory_sources %} {% for inv in ansible_inventory_sources %}
-i "{{ inv }}" -i "{{ inv }}"
@ -165,6 +176,7 @@
test-targets test-targets
-e ansible_user=mitogen__has_sudo -e ansible_user=mitogen__has_sudo
-e ansible_ssh_private_key_file=/dev/null -e ansible_ssh_private_key_file=/dev/null
-e ansible_python_interpreter=python3000
args: args:
chdir: ../.. chdir: ../..
register: out register: out

@ -3,24 +3,26 @@
hosts: test-targets[0] hosts: test-targets[0]
tasks: tasks:
- connection: local - connection: local
environment:
ANSIBLE_VERBOSITY: "{{ ansible_verbosity }}"
command: | command: |
ansible-playbook ansible-playbook
{% for inv in ansible_inventory_sources %} {% for inv in ansible_inventory_sources %}
-i "{{ inv }}" -i "{{ inv }}"
{% endfor %} {% endfor %}
-vvv
integration/strategy/_mixed_mitogen_vanilla.yml integration/strategy/_mixed_mitogen_vanilla.yml
args: args:
chdir: ../.. chdir: ../..
register: out register: out
- connection: local - connection: local
environment:
ANSIBLE_VERBOSITY: "{{ ansible_verbosity }}"
command: | command: |
ansible-playbook ansible-playbook
{% for inv in ansible_inventory_sources %} {% for inv in ansible_inventory_sources %}
-i "{{ inv }}" -i "{{ inv }}"
{% endfor %} {% endfor %}
-vvv
integration/strategy/_mixed_vanilla_mitogen.yml integration/strategy/_mixed_vanilla_mitogen.yml
args: args:
chdir: ../.. chdir: ../..

@ -12,6 +12,8 @@
- include_tasks: _end_play_if_not_sudo_linux.yml - include_tasks: _end_play_if_not_sudo_linux.yml
- name: Run stub-lxc-info.py - name: Run stub-lxc-info.py
environment:
ANSIBLE_VERBOSITY: "{{ ansible_verbosity }}"
command: | command: |
sudo -nE "{{lookup('env', 'VIRTUAL_ENV')}}/bin/ansible" sudo -nE "{{lookup('env', 'VIRTUAL_ENV')}}/bin/ansible"
-i localhost, -i localhost,

@ -12,6 +12,8 @@
- include_tasks: _end_play_if_not_sudo_linux.yml - include_tasks: _end_play_if_not_sudo_linux.yml
- name: Run ansible stub-lxc.py - name: Run ansible stub-lxc.py
environment:
ANSIBLE_VERBOSITY: "{{ ansible_verbosity }}"
command: | command: |
sudo -nE "{{lookup('env', 'VIRTUAL_ENV')}}/bin/ansible" sudo -nE "{{lookup('env', 'VIRTUAL_ENV')}}/bin/ansible"
-i localhost, -i localhost,

@ -8,6 +8,7 @@
- name: Create file tree - name: Create file tree
connection: local connection: local
run_once: true
shell: > shell: >
mkdir /tmp/filetree.in; mkdir /tmp/filetree.in;
seq -f /tmp/filetree.in/%g 1 1000 | xargs touch; seq -f /tmp/filetree.in/%g 1 1000 | xargs touch;
@ -21,17 +22,30 @@
file: file:
state: directory state: directory
path: /tmp/filetree.out path: /tmp/filetree.out
mode: u=rwx,go=rx
- name: Trigger nasty process pileup - name: Trigger nasty process pileup
copy: copy:
src: "{{item.src}}" src: "{{item.src}}"
dest: "/tmp/filetree.out/{{item.path}}" dest: "/tmp/filetree.out/{{item.path}}"
mode: 0644 mode: u=rw,go=r
with_filetree: /tmp/filetree.in with_filetree: /tmp/filetree.in
when: item.state == 'file' when: item.state == 'file'
loop_control: loop_control:
label: "/tmp/filetree.out/{{ item.path }}" label: "/tmp/filetree.out/{{ item.path }}"
- name: Cleanup local file tree
connection: local
run_once: true
file:
path: /tmp/filetree.in
state: absent
- name: Cleanup remote file tree
file:
path: /tmp/filetree.out
state: absent
tags: tags:
- resource_intensive - resource_intensive
- issue_140 - issue_140

@ -4,10 +4,9 @@
# can test for. # can test for.
- name: regression/issue_152__local_action_wrong_interpreter.yml - name: regression/issue_152__local_action_wrong_interpreter.yml
hosts: test-targets hosts: test-targets[0]
connection: local connection: local
tasks: tasks:
- name: Create /tmp/issue_152_interpreter.sh - name: Create /tmp/issue_152_interpreter.sh
copy: copy:
dest: /tmp/issue_152_interpreter.sh dest: /tmp/issue_152_interpreter.sh

@ -14,11 +14,14 @@
shell: | shell: |
dd if=/dev/zero of=/tmp/512mb.zero bs=1048576 count=512; dd if=/dev/zero of=/tmp/512mb.zero bs=1048576 count=512;
chmod go= /tmp/512mb.zero chmod go= /tmp/512mb.zero
args:
creates: /tmp/512mb.zero
- name: Fetch /tmp/512mb.zero - name: Fetch /tmp/512mb.zero
fetch: fetch:
src: /tmp/512mb.zero src: /tmp/512mb.zero
dest: /tmp/fetch-out dest: /tmp/fetch-{{ inventory_hostname }}-512mb.zero
flat: true
- name: Cleanup /tmp/512mb.zero - name: Cleanup /tmp/512mb.zero
file: file:
@ -27,11 +30,10 @@
- name: Cleanup fetched file - name: Cleanup fetched file
file: file:
path: /tmp/fetch-out path: /tmp/fetch-{{ inventory_hostname }}-512mb.zero
state: absent state: absent
become: false become: false
delegate_to: localhost delegate_to: localhost
run_once: true
tags: tags:
- issue_615 - issue_615
- mitogen_only - mitogen_only

@ -6,6 +6,8 @@
tasks: tasks:
- name: Test --ask-become-pass - name: Test --ask-become-pass
delegate_to: localhost delegate_to: localhost
environment:
ANSIBLE_VERBOSITY: "{{ ansible_verbosity }}"
expect: expect:
command: > command: >
ansible-playbook ansible-playbook

Loading…
Cancel
Save