]> git.immae.eu Git - github/fretlink/ansible-postgresql-role.git/blob - tasks/postgres-database-extensions.yml
Allow to use any ansible become method
[github/fretlink/ansible-postgresql-role.git] / tasks / postgres-database-extensions.yml
1 ---
2 - name: "Install required packages for 'postgres_ext' ansible module"
3 apt:
4 name:
5 - libpq-dev
6 - python-psycopg2
7
8 - name: Install system dependencies of extensions
9 apt:
10 name: "{{ postgres_extension.apt_deps | default([]) }}"
11 cache_valid_time: 86400
12
13 - name: "CREATE EXTENSION on database {{ postgres_dbname }}"
14 become: true
15 become_user: postgres
16 become_method: "{{ postgres_become_method }}"
17 postgresql_ext:
18 name: "{{ postgres_extension_name }}"
19 db: "{{ postgres_dbname }}"
20 port: "{{ postgres_port }}"
21 loop: "{{ postgres_extension.names | default([]) }}"
22 loop_control:
23 loop_var: postgres_extension_name