change: Only set the postgresql version if it is not set already

This commit is contained in:
2025-10-20 19:35:38 +02:00
parent 52ee1f861a
commit f89365eecb
+7 -1
View File
@@ -1,8 +1,14 @@
--- ---
- name: Determine postgresql version
ansible.builtin.command:
cmd: uberspace tools version show postgresql
register: active_postgresql_version
changed_when: false
- name: Set used postgresql version - name: Set used postgresql version
ansible.builtin.command: ansible.builtin.command:
cmd: uberspace tools version use postgresql {{ postgresql_version }} cmd: uberspace tools version use postgresql {{ postgresql_version }}
changed_when: false changed_when: true
when: active_postgresql_version.stdout.find(postgresql_version) == -1
- name: Extend bash profile - name: Extend bash profile
ansible.builtin.import_tasks: profile.yaml ansible.builtin.import_tasks: profile.yaml
- name: Set up postgresql - name: Set up postgresql