From 39ff70fee7f22fb41a22330869d088c15e14e361 Mon Sep 17 00:00:00 2001 From: Michael Zalewski Date: Fri, 20 Oct 2017 16:22:49 -0400 Subject: [PATCH] Forcing quartz_scheduler roles to append to pgpass file --- roles/quartz_scheduler/tasks/main.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/roles/quartz_scheduler/tasks/main.yml b/roles/quartz_scheduler/tasks/main.yml index 9db9821..ce8094c 100644 --- a/roles/quartz_scheduler/tasks/main.yml +++ b/roles/quartz_scheduler/tasks/main.yml @@ -6,6 +6,19 @@ encoding='UTF-8' become_user: postgres +- name: create password file on vagrant box + become: true + become_user: postgres + lineinfile: + dest: ~/.pgpass + state: present + create: yes + line: "{{ item }}" + mode: 0600 + with_items: + - "#hostname:port:database:username:password" + - "localhost:5432:{{ db_name }}:{{ db_user }}:{{ db_user_pw }}" + - name: Copy Quartz Table Creation Script become: true become_user: postgres -- GitLab