diff options
author | Paul B <paul+gh@bonaud.fr> | 2019-05-03 10:59:19 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-05-03 10:59:19 +0200 |
commit | c6719a82860c7855fb749f98734fe17c38c2fe78 (patch) | |
tree | 214db2306ef4a929da043d0209ca70bde78ee28b /tasks/postgres-user.yml | |
parent | 0c83dd00b4110d55b1602ca8d732a8cb414cfd0a (diff) | |
parent | 29f3186f165565e03b3b091523f8b682be99404a (diff) | |
download | ansible-postgresql-role-c6719a82860c7855fb749f98734fe17c38c2fe78.tar.gz ansible-postgresql-role-c6719a82860c7855fb749f98734fe17c38c2fe78.tar.zst ansible-postgresql-role-c6719a82860c7855fb749f98734fe17c38c2fe78.zip |
Merge pull request #9 from chtitux/become-method
Allow to use any ansible become method
Diffstat (limited to 'tasks/postgres-user.yml')
-rw-r--r-- | tasks/postgres-user.yml | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tasks/postgres-user.yml b/tasks/postgres-user.yml index 308dab8..fcef9fc 100644 --- a/tasks/postgres-user.yml +++ b/tasks/postgres-user.yml | |||
@@ -1,7 +1,7 @@ | |||
1 | - name: Test if the PostgreSQL server is up | 1 | - name: Test if the PostgreSQL server is up |
2 | become: true | 2 | become: true |
3 | become_user: postgres | 3 | become_user: postgres |
4 | become_method: su | 4 | become_method: "{{ postgres_become_method }}" |
5 | command: psql --port={{ postgres_port }} --command='select NOW()' | 5 | command: psql --port={{ postgres_port }} --command='select NOW()' |
6 | register: postgres_up | 6 | register: postgres_up |
7 | ignore_errors: yes | 7 | ignore_errors: yes |
@@ -11,7 +11,7 @@ | |||
11 | - name: Create PostgreSQL user | 11 | - name: Create PostgreSQL user |
12 | become: true | 12 | become: true |
13 | become_user: postgres | 13 | become_user: postgres |
14 | become_method: su | 14 | become_method: "{{ postgres_become_method }}" |
15 | postgresql_user: | 15 | postgresql_user: |
16 | port: "{{ postgres_port }}" | 16 | port: "{{ postgres_port }}" |
17 | name: "{{ postgres_username }}" | 17 | name: "{{ postgres_username }}" |