|
9 | 9 | tags: installation
|
10 | 10 |
|
11 | 11 | - name: Check Nomad package checksum file
|
12 |
| - local_action: stat path="{{ role_path }}/files/nomad_{{ nomad_version }}_SHA256SUMS" |
| 12 | + stat: |
| 13 | + path: "{{ role_path }}/files/nomad_{{ nomad_version }}_SHA256SUMS" |
13 | 14 | become: false
|
14 | 15 | run_once: true
|
15 | 16 | tags: installation
|
16 | 17 | register: nomad_checksum
|
| 18 | + delegate_to: 127.0.0.1 |
17 | 19 |
|
18 | 20 | - name: Get Nomad package checksum file
|
19 |
| - local_action: get_url url="{{ nomad_checksum_file_url }}" dest="{{ role_path }}/files/nomad_{{ nomad_version }}_SHA256SUMS" |
| 21 | + get_url: |
| 22 | + url: "{{ nomad_checksum_file_url }}" |
| 23 | + dest: "{{ role_path }}/files/nomad_{{ nomad_version }}_SHA256SUMS" |
20 | 24 | become: false
|
21 | 25 | run_once: true
|
22 | 26 | tags: installation
|
23 |
| - when: nomad_checksum.stat.exists == False |
| 27 | + when: not nomad_checksum.stat.exists |
| 28 | + delegate_to: 127.0.0.1 |
24 | 29 |
|
25 | 30 | - name: Get Nomad package checksum
|
26 |
| - local_action: shell grep "{{ nomad_pkg }}" "{{ role_path }}/files/nomad_{{ nomad_version }}_SHA256SUMS" | awk '{print $1}' |
| 31 | + shell: grep "{{ nomad_pkg }}" "{{ role_path }}/files/nomad_{{ nomad_version }}_SHA256SUMS" | awk '{print $1}' |
27 | 32 | become: false
|
28 | 33 | register: nomad_sha256
|
29 | 34 | tags: installation
|
| 35 | + delegate_to: 127.0.0.1 |
30 | 36 |
|
31 | 37 | - name: Check Nomad package file
|
32 |
| - local_action: stat path="{{ role_path }}/files/{{ nomad_pkg }}" |
| 38 | + stat: |
| 39 | + path: "{{ role_path }}/files/{{ nomad_pkg }}" |
33 | 40 | become: false
|
34 | 41 | register: nomad_package
|
| 42 | + delegate_to: 127.0.0.1 |
35 | 43 |
|
36 | 44 | - name: Download Nomad
|
37 |
| - local_action: get_url url="{{ nomad_zip_url }}" dest="{{ role_path }}/files/{{ nomad_pkg }}" checksum="sha256:{{ nomad_sha256.stdout }}" timeout="42" |
| 45 | + get_url: |
| 46 | + url: "{{ nomad_zip_url }}" |
| 47 | + dest: "{{ role_path }}/files/{{ nomad_pkg }}" |
| 48 | + checksum: "sha256:{{ nomad_sha256.stdout }}" |
| 49 | + timeout: "42" |
38 | 50 | become: false
|
39 | 51 | tags: installation
|
40 |
| - when: nomad_package.stat.exists == False |
| 52 | + delegate_to: 127.0.0.1 |
| 53 | + when: not nomad_package.stat.exists |
41 | 54 |
|
42 | 55 | - name: Create Temporary Directory for Extraction
|
43 |
| - local_action: |
44 |
| - module: tempfile |
| 56 | + tempfile: |
45 | 57 | state: directory
|
46 | 58 | prefix: ansible-nomad.
|
47 | 59 | become: false
|
48 | 60 | register: install_temp
|
49 | 61 | tags: installation
|
| 62 | + delegate_to: 127.0.0.1 |
50 | 63 |
|
51 | 64 | - name: Unarchive Nomad
|
52 |
| - local_action: unarchive src="{{ role_path }}/files/{{ nomad_pkg }}" dest="{{ install_temp.path }}/" creates="{{ install_temp.path }}/nomad" |
| 65 | + unarchive: |
| 66 | + src: "{{ role_path }}/files/{{ nomad_pkg }}" |
| 67 | + dest: "{{ install_temp.path }}/" |
| 68 | + creates: "{{ install_temp.path }}/nomad" |
53 | 69 | become: false
|
54 | 70 | tags: installation
|
| 71 | + delegate_to: 127.0.0.1 |
55 | 72 |
|
56 | 73 | - name: Install Nomad
|
57 | 74 | copy:
|
|
63 | 80 | tags: installation
|
64 | 81 |
|
65 | 82 | - name: Cleanup
|
66 |
| - local_action: file path="{{ install_temp.path }}" state="absent" |
| 83 | + file: |
| 84 | + path: "{{ install_temp.path }}" |
| 85 | + state: "absent" |
67 | 86 | become: false
|
68 | 87 | tags: installation
|
| 88 | + delegate_to: 127.0.0.1 |
0 commit comments