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
|
# issue #615: 'fetch' with become: was internally using slurp.
- name: regression/issue_615_streaming_transfer.yml
hosts: test-targets
gather_facts: no
# Without Mitogen this causes Ansible to use the slurp module, which is *slow*
become: true
vars:
mitogen_ssh_compression: false
tasks:
- include_tasks: _mitogen_only.yml
- block:
- name: Create /tmp/512mb.zero
shell: |
dd if=/dev/zero of=/tmp/512mb.zero bs=1048576 count=512;
chmod go= /tmp/512mb.zero
args:
creates: /tmp/512mb.zero
- name: Fetch /tmp/512mb.zero
fetch:
src: /tmp/512mb.zero
dest: /tmp/fetch-{{ inventory_hostname }}-512mb.zero
flat: true
- name: Cleanup /tmp/512mb.zero
file:
path: /tmp/512mb.zero
state: absent
- name: Cleanup fetched file
file:
path: /tmp/fetch-{{ inventory_hostname }}-512mb.zero
state: absent
become: false
delegate_to: localhost
tags:
- issue_615
- mitogen_only
|