summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2016-03-02 17:56:44 +0000
committerGerrit Code Review <review@openstack.org>2016-03-02 17:56:44 +0000
commitd351b3e07ec4f7c41f5b7da73cf0aeb7feca3bde (patch)
tree861674674a044a362d93e4af110f453b8af55891
parent403053534b90c7c881884561b4e709d885706595 (diff)
parent139ca911ab4bda969f24b7a5d0a28e3f49893e70 (diff)
Merge "Safely fail when logs cannot be found"
-rw-r--r--tasks/main.yml1
1 files changed, 1 insertions, 0 deletions
diff --git a/tasks/main.yml b/tasks/main.yml
index c4bdd8a..b0ca387 100644
--- a/tasks/main.yml
+++ b/tasks/main.yml
@@ -67,6 +67,7 @@
67 - name: find logs 67 - name: find logs
68 shell: "ls -tr /var/lib/puppet/reports/{{ ansible_fqdn }}/*_puppetdb.json" 68 shell: "ls -tr /var/lib/puppet/reports/{{ ansible_fqdn }}/*_puppetdb.json"
69 register: files 69 register: files
70 failed_when: files.stdout_lines|default("") == ""
70 71
71 - name: set log filename 72 - name: set log filename
72 set_fact: puppet_logfile="{{ files.stdout_lines|sort|last }}" 73 set_fact: puppet_logfile="{{ files.stdout_lines|sort|last }}"