openqa/server: check stdout not stderr for database creation

This commit is contained in:
Adam Williamson 2017-03-07 23:23:08 -08:00
parent 0e20a588bf
commit f2a8760d1a

View file

@ -207,7 +207,7 @@
shell: "/usr/share/openqa/script/initdb --user geekotest --init_database"
register: initdb
changed_when: "initdb.rc == 0"
failed_when: "(initdb.rc > 0) and (initdb.stderr is not defined or initdb.stderr.find('already exists') == -1)"
failed_when: "(initdb.rc > 0) and (initdb.stdout is not defined or initdb.stdout.find('already exists') == -1)"
- name: Enable and start services
service: name={{ item }} enabled=yes state=started