File: file_transfer.yml

package info (click to toggle)
python-mitogen 0.3.3-9%2Bdeb12u1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 6,816 kB
  • sloc: python: 22,086; sh: 171; makefile: 74; perl: 19; ansic: 18; javascript: 5
file content (71 lines) | stat: -rw-r--r-- 1,465 bytes parent folder | download | duplicates (2)
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
68
69
70
71

- name: bench/file_transfer.yml
  hosts: test-targets
  any_errors_fatal: true
  tasks:

  - name: Make 32MiB file
    delegate_to: localhost
    shell: openssl rand 33554432 > /tmp/bigfile.in

  - name: Make 320MiB file
    delegate_to: localhost
    shell: >
      cat
      /tmp/bigfile.in
      /tmp/bigfile.in
      /tmp/bigfile.in
      /tmp/bigfile.in
      /tmp/bigfile.in
      /tmp/bigfile.in
      /tmp/bigfile.in
      /tmp/bigfile.in
      /tmp/bigfile.in
      /tmp/bigfile.in
      > /tmp/bigbigfile.in

  - name: Delete SSH file is present.
    file:
      path: "{{item}}"
      state: absent
    become: true
    with_items:
    - /tmp/bigfile.out
    - /tmp/bigbigfile.out

  - name: Copy 32MiB file via SSH
    copy:
      src: /tmp/bigfile.in
      dest: /tmp/bigfile.out

  - name: Copy 320MiB file via SSH
    copy:
      src: /tmp/bigbigfile.in
      dest: /tmp/bigbigfile.out

  - name: Delete localhost sudo file if present.
    file:
      path: "{{item}}"
      state: absent
    delegate_to: localhost
    become: true
    with_items:
    - /tmp/bigfile.out
    - /tmp/bigbigfile.out

  - name: Copy 32MiB file via localhost sudo
    delegate_to: localhost
    become: true
    copy:
      src: /tmp/bigfile.in
      dest: /tmp/bigfile.out

  - name: Copy 320MiB file via localhost sudo
    delegate_to: localhost
    become: true
    copy:
      src: /tmp/bigbigfile.in
      dest: /tmp/bigbigfile.out

  tags:
  - resource_intensive