From 0675dcc36d6e69cd452d345c554090e1d7d0af39 Mon Sep 17 00:00:00 2001 From: Jonathan Bouzekri Date: Sun, 14 Feb 2016 15:18:42 +0100 Subject: [PATCH] create conf files if they do not exist --- tasks/main.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tasks/main.yml b/tasks/main.yml index 57690b7..ca3c531 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -29,13 +29,13 @@ file: path={{ postgresql_conf_dir }}/conf.d state=directory owner=postgres group=postgres - name: Set conf.d include in postgresql.conf - lineinfile: line="include_dir 'conf.d'" dest={{ postgresql_conf_dir }}/postgresql.conf backup=yes + lineinfile: line="include_dir 'conf.d'" dest={{ postgresql_conf_dir }}/postgresql.conf backup=yes create=yes notify: Reload PostgreSQL when: "{{ postgresql_version | version_compare('9.3', '>=') }}" - name: Include 25ansible_postgresql.conf in postgresql.conf - lineinfile: line="include 'conf.d/25ansible_postgresql.conf'" dest={{ postgresql_conf_dir }}/postgresql.conf backup=yes + lineinfile: line="include 'conf.d/25ansible_postgresql.conf'" dest={{ postgresql_conf_dir }}/postgresql.conf backup=yes create=yes notify: Reload PostgreSQL when: "{{ postgresql_version | version_compare('9.3', '<') }}"