From 82ede41fe9170fb7c84e7be450d0d94805ebb660 Mon Sep 17 00:00:00 2001 From: Markus Hauschild Date: Mon, 27 May 2024 22:48:36 +0200 Subject: [PATCH] netbox: fix psycopg dependency to use binary the C variant will fail to compile --- roles/netbox/tasks/main.yml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/roles/netbox/tasks/main.yml b/roles/netbox/tasks/main.yml index 67f3ccf..e3abf8e 100644 --- a/roles/netbox/tasks/main.yml +++ b/roles/netbox/tasks/main.yml @@ -74,13 +74,21 @@ group: "{{ netbox_group }}" recurse: yes +- name: Fix psycopg variant + lineinfile: + path: "/opt/netbox-{{ netbox_version }}/requirements.txt" + regexp: '^psycopg\[.*,pool\]==(.*)$' + line: 'psycopg[binary,pool]==\1' + backrefs: yes + register: netbox_psycopg_fix + - name: Run upgrade script command: cmd: ./upgrade.sh chdir: "/opt/netbox-{{ netbox_version }}" become: true become_user: "{{ netbox_user }}" - when: netbox_unarchive.changed + when: netbox_unarchive.changed or netbox_psycopg_fix.changed # TODO - still manual work # * Create a super user