From f1a9ab46fed919f445e3b2eacb90a594eb095fd1 Mon Sep 17 00:00:00 2001 From: Paul B Date: Mon, 7 Jan 2019 18:01:00 +0100 Subject: improvement: remove 'with_items' loop and use modern ansible loops Ansible > 2.5 needed --- tasks/postgres-cluster.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'tasks/postgres-cluster.yml') diff --git a/tasks/postgres-cluster.yml b/tasks/postgres-cluster.yml index 769d119..c052982 100644 --- a/tasks/postgres-cluster.yml +++ b/tasks/postgres-cluster.yml @@ -1,3 +1,16 @@ +--- +- set_fact: + postgres_version: "{{ postgres_cluster.version }}" + postgres_cluster_name: "{{ postgres_cluster.name }}" + postgres_port: "{{ postgres_cluster.port }}" + postgres_fsync_enabled: "{{ postgres_cluster.fsync_enabled }}" + postgres_archive_enabled: "{{ postgres_cluster.archive_enabled }}" + postgres_max_replication_slots: "{{ postgres_cluster.max_replication_slots | default(10) }}" + postgres_extra_config: "{{ postgres_cluster.extra_config | default({}) }}" + barman_directory: "{{ postgres_cluster.barman_directory | default(None) }}" + postgres_primary: "{{ postgres_cluster.primary | default(None) }}" + postgres_checksums: "{{ postgres_cluster.checksums | default(True) }}" + - name: Install postgresql version {{ postgres_version }} apt: name=postgresql-{{ postgres_version }} when: ansible_distribution_release != 'NA' -- cgit v1.2.3