From 5b779e40f2b6a752452229825173b94b0d0f1284 Mon Sep 17 00:00:00 2001 From: Andrii Date: Sat, 7 Dec 2024 15:32:49 +0200 Subject: [PATCH] add config file --- ansible1/ansible.cfg | 4 ++++ ansible1/roles/postgresql/tasks/main.yml | 3 +++ ansible1/roles/postgresql/vars/main.yml | 2 +- 3 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 ansible1/ansible.cfg diff --git a/ansible1/ansible.cfg b/ansible1/ansible.cfg new file mode 100644 index 000000000..66b2efea5 --- /dev/null +++ b/ansible1/ansible.cfg @@ -0,0 +1,4 @@ +[privilege_escalation] +become=True +become_method = sudo +pipelining = true \ No newline at end of file diff --git a/ansible1/roles/postgresql/tasks/main.yml b/ansible1/roles/postgresql/tasks/main.yml index 2b3ad8ae7..73f8d2899 100644 --- a/ansible1/roles/postgresql/tasks/main.yml +++ b/ansible1/roles/postgresql/tasks/main.yml @@ -135,6 +135,9 @@ login_user: "{{ postgres_user }}" login_password: "" state: present + become: true + # become_user: "{{ postgres_user }}" +############## # - name: Create PostgreSQL DB # postgresql_db: # name: "{{ postgres_db_development_name }}" diff --git a/ansible1/roles/postgresql/vars/main.yml b/ansible1/roles/postgresql/vars/main.yml index d8caecd2b..7d298f15b 100644 --- a/ansible1/roles/postgresql/vars/main.yml +++ b/ansible1/roles/postgresql/vars/main.yml @@ -11,7 +11,7 @@ postgres_db_test_name: "zero_waste_test" postgresql_python_library: "python3-psycopg2" postgresql_hba_entries: - { type: local, database: all, user: postgres, auth_method: trust } - - { type: local, database: all, user: all, auth_method: md5 } + - { type: local, database: all, user: all, auth_method: trust } - { type: host, database: all,