File tree 1 file changed +21
-3
lines changed
1 file changed +21
-3
lines changed Original file line number Diff line number Diff line change 91
91
become : false
92
92
local_action :
93
93
module : command
94
- cmd : gcloud storage cp "{{ AHF_LOCATION }}" "{{ local_ahf_path }}"
94
+ cmd : gcloud storage cp --verbosity=debug "{{ AHF_LOCATION }}" "{{ local_ahf_path }}"
95
95
register : gsutil_result
96
96
changed_when : gsutil_result.rc == 0
97
97
240
240
241
241
- name : Get a tmpfile name
242
242
set_fact :
243
- TMPFILE : " {{ lookup('pipe','mktemp') }}"
243
+ TMPFILE : " {{ lookup('pipe','mktemp -t orachk.XXXXXX ') }}"
244
244
245
+ # create a temporary log file from the orachk run
246
+ # this can be used the location of the zip file created by ORAchk
245
247
- name : Run ORAchk
246
248
become : true
247
249
shell : " ORACLE_PATH={{ orachk_script_dir }} SQLPATH={{ orachk_script_dir }} {{ ORACHK_BASE }}/orachk/orachk -s -dbconfig {{ ORACLE_HOME }}%{{ ORACLE_SID }} -showpass -profile dba | tee {{ TMPFILE }}"
270
272
ORACHK_RPT_FILE : " {{ orachk_file_info.stdout }}"
271
273
272
274
- name : Verify ORAchk Report File Existence
275
+ become : true
273
276
stat :
274
277
path : " {{ ORACHK_RPT_FILE }}"
275
278
register : orachk_rpt_location
279
282
msg : " Could not locate ORAchk report file {{ ORACHK_RPT_FILE }}"
280
283
when : not orachk_rpt_location.stat.exists
281
284
285
+ - name : Create /tmp/orachk directory for the zip files
286
+ become : false
287
+ file :
288
+ path : /tmp/orachk/
289
+ state : directory
290
+ mode : " 0700"
291
+
282
292
- name : Fetch the ORAchk zipfile
293
+ become : true
283
294
fetch :
284
295
src : " {{ ORACHK_RPT_FILE }}"
285
- dest : /tmp/
296
+ dest : /tmp/orachk/
286
297
flat : true
287
298
register : fetch_result
288
299
300
+ - name : Remove temporary file on controller
301
+ file :
302
+ path : " {{ TMPFILE }}"
303
+ state : absent
304
+ delegate_to : localhost
305
+ when : TMPFILE is defined
306
+
289
307
- name : Deconfigure Expedited Testing
290
308
become : true
291
309
shell : cd "{{ ORACHK_BASE }}/orachk/" && [[ -r orachk.orig ]] && rm -f orachk && mv orachk.orig orachk && rm -f orachk-quicktest.sh
You can’t perform that action at this time.
0 commit comments