Skip to content

Commit

Permalink
Secure init-db.sql a bit
Browse files Browse the repository at this point in the history
  • Loading branch information
gildub committed Oct 25, 2024
1 parent dee8e14 commit 01b7a99
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions roles/tpa_single_node/tasks/guac/init.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
- name: Copy init-db.sql to Server
ansible.builtin.copy:
content: "{{ lookup('ansible.builtin.template', 'configs/init-db.sql') }}"
dest: "/tmp/init-db.sql"
dest: "{{ tpa_single_node_config_dir }}/init-db.sql"
remote_src: true
mode: "0666"
mode: "0600"

- name: Run init-db.sql
ansible.builtin.command: "psql postgresql://{{ tpa_single_node_pg_admin }}:{{ tpa_single_node_pg_admin_passwd }}@\
Expand All @@ -13,7 +13,7 @@
-v db_name={{ tpa_single_node_pg_db }} \
-v db_user={{ tpa_single_node_pg_user }} \
-v db_password={{ tpa_single_node_pg_user_passwd }} \
-f /tmp/init-db.sql"
-f {{ tpa_single_node_config_dir }}/init-db.sql"
changed_when: false

- name: Testing DB guac to make sure it is available
Expand Down

0 comments on commit 01b7a99

Please sign in to comment.