|
25 | 25 | password: "{{ remote_pulp_password }}" |
26 | 26 | file: "{{ found_files.files[0].path }}" |
27 | 27 | state: present |
| 28 | + register: upload_result |
| 29 | + until: upload_result is success |
| 30 | + retries: 3 |
| 31 | + delay: 60 |
28 | 32 |
|
29 | 33 | - name: Get sha256 hash |
30 | 34 | ansible.builtin.stat: |
|
40 | 44 | sha256: "{{ file_stats.stat.checksum }}" |
41 | 45 | relative_path: "{{ found_files.files[0].path | basename }}" |
42 | 46 | state: present |
| 47 | + register: file_content_result |
| 48 | + until: file_content_result is success |
| 49 | + retries: 3 |
| 50 | + delay: 5 |
43 | 51 |
|
44 | 52 | - name: Ensure file repo exists |
45 | 53 | pulp.squeezer.file_repository: |
|
48 | 56 | password: "{{ remote_pulp_password }}" |
49 | 57 | name: "{{ repository_name }}" |
50 | 58 | state: present |
| 59 | + register: file_repo_result |
| 60 | + until: file_repo_result is success |
| 61 | + retries: 3 |
| 62 | + delay: 5 |
51 | 63 |
|
52 | 64 | - name: Add content to file repo |
53 | 65 | pulp.squeezer.file_repository_content: |
|
58 | 70 | present_content: |
59 | 71 | - relative_path: "{{ found_files.files[0].path | basename }}" |
60 | 72 | sha256: "{{ file_stats.stat.checksum }}" |
| 73 | + register: file_repo_content_result |
| 74 | + until: file_repo_content_result is success |
| 75 | + retries: 3 |
| 76 | + delay: 5 |
61 | 77 |
|
62 | 78 | - name: Create a new publication to point to this version |
63 | 79 | pulp.squeezer.file_publication: |
|
67 | 83 | repository: "{{ repository_name }}" |
68 | 84 | state: present |
69 | 85 | register: publication_details |
| 86 | + until: publication_details is success |
| 87 | + retries: 3 |
| 88 | + delay: 5 |
70 | 89 |
|
71 | 90 | - name: Update distribution for latest version |
72 | 91 | pulp.squeezer.file_distribution: |
|
79 | 98 | content_guard: development |
80 | 99 | state: present |
81 | 100 | register: latest_distribution_details |
| 101 | + until: latest_distribution_details is success |
| 102 | + retries: 3 |
| 103 | + delay: 5 |
82 | 104 |
|
83 | 105 | - name: Create distribution for given version |
84 | 106 | pulp.squeezer.file_distribution: |
|
91 | 113 | content_guard: development |
92 | 114 | state: present |
93 | 115 | when: latest_distribution_details.changed |
| 116 | + register: distribution_result |
| 117 | + until: distribution_result is success |
| 118 | + retries: 3 |
| 119 | + delay: 5 |
94 | 120 |
|
95 | 121 | - name: Update new images file with versioned path |
96 | 122 | lineinfile: |
|
0 commit comments