Skip to content

Commit 582f0e6

Browse files
committed
report errors during ./configure
1 parent 204a619 commit 582f0e6

File tree

1 file changed

+19
-10
lines changed

1 file changed

+19
-10
lines changed

ansible/tasks/postgres-extensions/30-citus.yml

Lines changed: 19 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -40,19 +40,28 @@
4040
dest: '/tmp/citus'
4141
clone: yes
4242

43-
- name: Build Citus
43+
- name: Run ./configure
4444
command:
45-
cmd: "{{ item }}"
45+
cmd: "./configure"
4646
chdir: /tmp/citus
47-
loop:
48-
- './configure'
49-
- 'make'
50-
args:
51-
creates: "/tmp/citus/Makefile"
47+
register: configure_result
48+
ignore_errors: yes
5249

53-
- name: Install Citus
50+
- name: Check ./configure output
51+
assert:
52+
that: configure_result.rc == 0
53+
fail_msg: "./configure failed with the following output: {{ configure_result.stdout }} {{ configure_result.stderr }}"
54+
success_msg: "./configure succeeded with the following output: {{ configure_result.stdout }}"
55+
when: configure_result is defined
56+
57+
- name: Run make to build Citus
5458
command:
55-
cmd: "sudo make install"
59+
cmd: "make"
5660
chdir: /tmp/citus
61+
when: configure_result is defined and configure_result.rc == 0
5762

58-
63+
- name: Install Citus
64+
command:
65+
cmd: "make install"
66+
chdir: /tmp/citus
67+
when: configure_result is defined and configure_result.rc == 0

0 commit comments

Comments
 (0)