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