|
@@ -27,6 +27,9 @@
|
|
|
|
|
|
- debug: var=quay_mft
|
|
|
|
|
|
+ - debug:
|
|
|
+ msg: "{{ (quay_mft.stderr | ansible.builtin.regex_search('FATAL: database .* does not exist')) }}"
|
|
|
+
|
|
|
- name: Remember the number of image manifests in quay.
|
|
|
ansible.builtin.set_fact:
|
|
|
quay_nmft: "{{ quay_mft.stdout_lines[0] | default(0) | trim | int }}"
|
|
@@ -52,8 +55,10 @@
|
|
|
name: postgresql
|
|
|
command: psql -d postgres -U postgres -t -c 'CREATE DATABASE quay OWNER quay'
|
|
|
when:
|
|
|
+ - quay_mft.rc > 0
|
|
|
- (quay_mft.stderr | ansible.builtin.regex_search('FATAL: database .* does not exist')) is defined
|
|
|
- (quay_mft.stderr | ansible.builtin.regex_search('FATAL: database .* does not exist')) != ""
|
|
|
+ # TODO: something is wrong with the above regex_searches
|
|
|
|
|
|
- name: Create a temporary pgpass file
|
|
|
ansible.builtin.copy:
|
|
@@ -96,6 +101,7 @@
|
|
|
failed_when:
|
|
|
- (quay_import.stderr | regex_search('FATAL')) is defined
|
|
|
- (quay_import.stderr | regex_search('FATAL')) != ""
|
|
|
+ # TODO: what's up with no output, no rc, but still failed?!?
|
|
|
|
|
|
- debug: var=quay_import
|
|
|
|