mirror of
https://git.lapiole.org/dani/ansible-roles.git
synced 2025-04-16 02:03:09 +02:00
Update to 2022-01-25 13:00
This commit is contained in:
parent
bc89de8f63
commit
44ee2cb941
@ -39,6 +39,10 @@ pg_base_conf:
|
||||
pg_extra_conf: {}
|
||||
pg_conf: "{{ pg_base_conf | combine(pg_extra_conf, recursive=True) }}"
|
||||
|
||||
# If pg_monitoring_user and pg_monitoring_pass are defined, a user will be created
|
||||
# Made for Zabbix
|
||||
# pg_monitoring_user: zbx
|
||||
# pg_monitoring_pass: S3cr3t.
|
||||
|
||||
# Databases and roles to create
|
||||
# Eg
|
||||
|
@ -108,6 +108,26 @@
|
||||
with_items: "{{ pg_roles }}"
|
||||
tags: pg
|
||||
|
||||
- when: pg_monitoring_user is defined and pg_monitoring_pass is defined
|
||||
block:
|
||||
- name: Create monitoring user
|
||||
postgresql_user:
|
||||
name: "{{ pg_monitoring_user }}"
|
||||
password: "{{ pg_monitoring_pass }}"
|
||||
|
||||
- name: Grant privileges for monitoring user
|
||||
postgresql_privs:
|
||||
type: function
|
||||
state: present
|
||||
privs: EXECUTE
|
||||
schema: pg_catalog
|
||||
objs: pg_ls_dir(text),pg_stat_file(text),pg_ls_waldir()
|
||||
role: "{{ pg_monitoring_user }}"
|
||||
database: postgres
|
||||
|
||||
become_user: postgres
|
||||
tags: pg,zabbix
|
||||
|
||||
- name: Create databases
|
||||
postgresql_db:
|
||||
name: "{{ item.name }}"
|
||||
|
@ -4,6 +4,7 @@
|
||||
shell: ls -1 /etc/ssh/authorized_keys | xargs -n1 basename
|
||||
register: existing_ssh_keys
|
||||
changed_when: False
|
||||
failed_when: False # The task can fail if there's no key yet
|
||||
tags: ssh
|
||||
|
||||
- name: Remove unmanaged ssh keys
|
||||
|
Loading…
x
Reference in New Issue
Block a user