From 1bf271a4f4680b3de15c3c49e2ffbbd31b8c1084 Mon Sep 17 00:00:00 2001 From: Eric Morino Date: Thu, 26 Dec 2019 16:15:31 +0100 Subject: [PATCH] =?UTF-8?q?Add=20install=20PostGIS=20in=20postgresql=20r?= =?UTF-8?q?=C3=B4le?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- postgresql/defaults/main.yml | 5 ++++- postgresql/tasks/main.yml | 3 +++ postgresql/tasks/postgis.yml | 5 +++++ 3 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 postgresql/tasks/postgis.yml diff --git a/postgresql/defaults/main.yml b/postgresql/defaults/main.yml index 81a255ac..f459aeff 100644 --- a/postgresql/defaults/main.yml +++ b/postgresql/defaults/main.yml @@ -11,5 +11,8 @@ postgresql_effective_cache_size: "{{ (ansible_memtotal_mb * 0.5) | int }}MB" # PostgreSQL version postgresql_version: '9.6' -#Set locales +# Set locales locales_default: fr_FR.UTF-8 + +# PostGIS +postgresql_install_postgis: false diff --git a/postgresql/tasks/main.yml b/postgresql/tasks/main.yml index f80ddca6..48ab5ec1 100644 --- a/postgresql/tasks/main.yml +++ b/postgresql/tasks/main.yml @@ -17,3 +17,6 @@ - include: munin.yml - include: logrotate.yml + +- include: postgis.yml + when: postgresql_install_postgis == "true" diff --git a/postgresql/tasks/postgis.yml b/postgresql/tasks/postgis.yml new file mode 100644 index 00000000..ed4ebe4a --- /dev/null +++ b/postgresql/tasks/postgis.yml @@ -0,0 +1,5 @@ +--- +- name: Install PostGIS extention + apt: + name: postgis + state: present