fix variables
This commit is contained in:
parent
4bfaf60650
commit
502b21a656
@ -16,18 +16,18 @@
|
||||
become: True
|
||||
become_user: root
|
||||
|
||||
- name: Ensure linux user '{{ postgresql_users }}' is present
|
||||
- name: Ensure linux user '{{ postgres_user }}' is present
|
||||
user:
|
||||
name: "{{ item.name }}"
|
||||
password: "{{ item.password }}"
|
||||
with_items: "{{ postgresql_users }}"
|
||||
with_items: "{{ postgres_users }}"
|
||||
when: item.name == postgres_user
|
||||
|
||||
- name: Force all notified handlers to activate pg_hba.conf
|
||||
meta: flush_handlers
|
||||
|
||||
- name: Ensure PostgreSQL users are present
|
||||
postgresql_user:
|
||||
postgres_user:
|
||||
name: "{{ item.name }}"
|
||||
password: "{{ item.password | default(omit) }}"
|
||||
encrypted: "{{ item.encrypted | default('yes') }}"
|
||||
@ -36,12 +36,12 @@
|
||||
db: "{{ item.db | default(omit) }}"
|
||||
login_host: "{{ item.login_host | default('localhost') }}"
|
||||
login_password: "{{ item.login_password | default(omit) }}"
|
||||
login_user: "{{ item.login_user | default(postgresql_user) }}"
|
||||
login_unix_socket: "{{ item.login_unix_socket | default(postgresql_unix_socket_directories[0]) }}"
|
||||
login_user: "{{ item.login_user | default(postgres_user) }}"
|
||||
login_unix_socket: "{{ item.login_unix_socket | default(postgres_socket_directories[0]) }}"
|
||||
port: "{{ item.port | default(omit) }}"
|
||||
state: "{{ item.state | default('present') }}"
|
||||
with_items: "{{ postgresql_users }}"
|
||||
with_items: "{{ postgres_users }}"
|
||||
loop_control:
|
||||
label: "{{ item.name }}"
|
||||
become: true
|
||||
become_user: "{{ postgresql_user }}"
|
||||
become_user: "{{ postgres_user }}"
|
||||
|
Loading…
Reference in New Issue
Block a user