File: file_transfer.yml

package info (click to toggle)
python-mitogen 0.3.36-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 6,708 kB
  • sloc: python: 24,457; sh: 198; makefile: 74; perl: 19; ansic: 18
file content (113 lines) | stat: -rw-r--r-- 2,299 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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
- name: bench/file_transfer.yml
  hosts: test-targets
  tasks:
  - name: Make 32MiB file
    delegate_to: localhost
    run_once: true
    shell: openssl rand 33554432 > /tmp/bigfile.in
    args:
      creates: /tmp/bigfile.in

  - name: Make 320MiB file
    delegate_to: localhost
    run_once: true
    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
    args:
      creates: /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
      mode: ugo=rw

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

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

  - name: Copy 32MiB file via localhost sudo
    delegate_to: localhost
    run_once: true
    become: true
    copy:
      src: /tmp/bigfile.in
      dest: /tmp/bigfile.out
      mode: ugo=rw
    tags:
      - requires_local_sudo

  - name: Copy 320MiB file via localhost sudo
    delegate_to: localhost
    run_once: true
    become: true
    copy:
      src: /tmp/bigbigfile.in
      dest: /tmp/bigbigfile.out
      mode: ugo=rw
    tags:
      - 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:
  - resource_intensive