From 790e83b8fbccfbcbb95ab8cead834675188da711 Mon Sep 17 00:00:00 2001 From: strNophix Date: Mon, 14 Mar 2022 14:39:23 +0100 Subject: [PATCH] Added copying of sample-data to db vm --- roles/postgresql/tasks/main.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/roles/postgresql/tasks/main.yml b/roles/postgresql/tasks/main.yml index 361fca9..469b665 100644 --- a/roles/postgresql/tasks/main.yml +++ b/roles/postgresql/tasks/main.yml @@ -44,12 +44,15 @@ columns: - id bigserial primary key - content text -# TODO: Figure out what would be the correct `copy_from` +- name: Copy over dummy-data for `test`.`message` + copy: + src: "{{ role_path }}/files/sample.csv" + dest: /tmp/sample.csv - name: Insert sample data into `test`.`message` become_user: postgres become: yes community.postgresql.postgresql_copy: - copy_from: sample.csv + copy_from: /tmp/sample.csv db: test dst: message columns: content @@ -66,3 +69,4 @@ name: postgresql state: restarted enabled: yes + become: true