vendor/ANXS.postgresql/tasks/databases.yml in taperole-1.2.8 vs vendor/ANXS.postgresql/tasks/databases.yml in taperole-1.3.0

- old
+ new

@@ -24,10 +24,13 @@ - name: PostgreSQL | Add hstore to the databases with the requirement sudo: yes sudo_user: "{{ postgresql_service_user }}" shell: "psql {{item.name}} --username {{postgresql_admin_user}} -c 'CREATE EXTENSION IF NOT EXISTS hstore;'" with_items: postgresql_databases + register: hstore_ext_result + failed_when: hstore_ext_result.rc != 0 and ("already exists, skipping" not in hstore_ext_result.stderr) + changed_when: hstore_ext_result.rc == 0 and ("already exists, skipping" not in hstore_ext_result.stderr) when: item.hstore is defined and item.hstore - name: PostgreSQL | Add uuid-ossp to the database with the requirement sudo: yes sudo_user: "{{ postgresql_service_user }}" @@ -63,5 +66,15 @@ sudo: yes sudo_user: "{{ postgresql_service_user }}" shell: "psql {{item.name}} --username {{ postgresql_admin_user }} -c 'create extension if not exists earthdistance;'" with_items: postgresql_databases when: item.earthdistance is defined and item.earthdistance + +- name: PostgreSQL | Add citext to the database with the requirement + sudo: yes + sudo_user: "{{ postgresql_service_user }}" + shell: "psql {{item.name}} --username {{postgresql_admin_user}} -c 'CREATE EXTENSION IF NOT EXISTS citext;'" + with_items: postgresql_databases + register: citext_ext_result + failed_when: citext_ext_result.rc != 0 and ("already exists, skipping" not in citext_ext_result.stderr) + changed_when: citext_ext_result.rc == 0 and ("already exists, skipping" not in citext_ext_result.stderr) + when: item.citext is defined and item.citext