fix wrong order
This commit is contained in:
parent
a83edcf231
commit
50add42a91
@ -31,25 +31,3 @@
|
|||||||
when: postgres_iptables_enabled
|
when: postgres_iptables_enabled
|
||||||
become: True
|
become: True
|
||||||
become_user: root
|
become_user: root
|
||||||
|
|
||||||
- name: Force all notified handlers to activate pg_hba.conf
|
|
||||||
meta: flush_handlers
|
|
||||||
|
|
||||||
- name: Ensure PostgreSQL users are present
|
|
||||||
postgresql_user:
|
|
||||||
name: "{{ item.name }}"
|
|
||||||
password: "{{ 'md5' + (item.password + item.name) | hash('md5') }}"
|
|
||||||
encrypted: "{{ item.encrypted | default('yes') }}"
|
|
||||||
priv: "{{ item.priv | default(omit) }}"
|
|
||||||
role_attr_flags: "{{ item.role_attr_flags | default(omit) }}"
|
|
||||||
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(postgres_user) }}"
|
|
||||||
login_unix_socket: "{{ item.login_unix_socket | default(postgres_socket_directories[0]) }}"
|
|
||||||
port: "{{ item.port | default(omit) }}"
|
|
||||||
state: "{{ item.state | default('present') }}"
|
|
||||||
no_log: True
|
|
||||||
with_items: "{{ postgres_users }}"
|
|
||||||
become: true
|
|
||||||
become_user: "{{ postgres_user }}"
|
|
||||||
|
@ -1,4 +1,26 @@
|
|||||||
---
|
---
|
||||||
|
- name: Force all notified handlers to activate pg_hba.conf
|
||||||
|
meta: flush_handlers
|
||||||
|
|
||||||
|
- name: Ensure PostgreSQL users are present
|
||||||
|
postgresql_user:
|
||||||
|
name: "{{ item.name }}"
|
||||||
|
password: "{{ 'md5' + (item.password + item.name) | hash('md5') }}"
|
||||||
|
encrypted: "{{ item.encrypted | default('yes') }}"
|
||||||
|
priv: "{{ item.priv | default(omit) }}"
|
||||||
|
role_attr_flags: "{{ item.role_attr_flags | default(omit) }}"
|
||||||
|
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(postgres_user) }}"
|
||||||
|
login_unix_socket: "{{ item.login_unix_socket | default(postgres_socket_directories[0]) }}"
|
||||||
|
port: "{{ item.port | default(omit) }}"
|
||||||
|
state: "{{ item.state | default('present') }}"
|
||||||
|
no_log: True
|
||||||
|
with_items: "{{ postgres_users }}"
|
||||||
|
become: true
|
||||||
|
become_user: "{{ postgres_user }}"
|
||||||
|
|
||||||
- name: Ensure PostgreSQL is up and running
|
- name: Ensure PostgreSQL is up and running
|
||||||
service:
|
service:
|
||||||
name: "{{ __postgres_daemon }}"
|
name: "{{ __postgres_daemon }}"
|
||||||
|
Loading…
Reference in New Issue
Block a user