forked from evolix/ansible-roles
[Cleanup] postgresql: space before and after variable name
This commit is contained in:
parent
119e134373
commit
9e0202d3de
|
@ -10,13 +10,13 @@
|
||||||
|
|
||||||
- name: Allow conf.d/*.conf files to be included in PostgreSQL configuration
|
- name: Allow conf.d/*.conf files to be included in PostgreSQL configuration
|
||||||
lineinfile:
|
lineinfile:
|
||||||
name: "/etc/postgresql/{{postgresql_version}}/main/postgresql.conf"
|
name: "/etc/postgresql/{{ postgresql_version }}/main/postgresql.conf"
|
||||||
line: include_dir = 'conf.d'
|
line: include_dir = 'conf.d'
|
||||||
notify: restart postgresql
|
notify: restart postgresql
|
||||||
|
|
||||||
- name: Create conf.d directory
|
- name: Create conf.d directory
|
||||||
file:
|
file:
|
||||||
name: "/etc/postgresql/{{postgresql_version}}/main/conf.d/"
|
name: "/etc/postgresql/{{ postgresql_version }}/main/conf.d/"
|
||||||
state: directory
|
state: directory
|
||||||
owner: postgres
|
owner: postgres
|
||||||
group: postgres
|
group: postgres
|
||||||
|
@ -25,7 +25,7 @@
|
||||||
- name: Copy PostgreSQL config file
|
- name: Copy PostgreSQL config file
|
||||||
template:
|
template:
|
||||||
src: postgresql.conf.j2
|
src: postgresql.conf.j2
|
||||||
dest: "/etc/postgresql/{{postgresql_version}}/main/conf.d/zz-evolinux.conf"
|
dest: "/etc/postgresql/{{ postgresql_version }}/main/conf.d/zz-evolinux.conf"
|
||||||
owner: postgres
|
owner: postgres
|
||||||
group: postgres
|
group: postgres
|
||||||
mode: "0644"
|
mode: "0644"
|
||||||
|
|
|
@ -12,8 +12,8 @@
|
||||||
- name: Add Munin plugins for PostgreSQL
|
- name: Add Munin plugins for PostgreSQL
|
||||||
file:
|
file:
|
||||||
state: link
|
state: link
|
||||||
src: '/usr/share/munin/plugins/{{item}}'
|
src: '/usr/share/munin/plugins/{{ item }}'
|
||||||
dest: '/etc/munin/plugins/{{item}}'
|
dest: '/etc/munin/plugins/{{ item }}'
|
||||||
with_items:
|
with_items:
|
||||||
- postgres_bgwriter
|
- postgres_bgwriter
|
||||||
- postgres_checkpoints
|
- postgres_checkpoints
|
||||||
|
@ -26,10 +26,10 @@
|
||||||
- name: Add Munin plugins for PostgreSQL (for specific databases)
|
- name: Add Munin plugins for PostgreSQL (for specific databases)
|
||||||
file:
|
file:
|
||||||
state: link
|
state: link
|
||||||
src: '/usr/share/munin/plugins/{{item[0]}}'
|
src: '/usr/share/munin/plugins/{{ item[0] }}'
|
||||||
dest: '/etc/munin/plugins/{{item[0]}}{{item[1]}}'
|
dest: '/etc/munin/plugins/{{ item[0] }}{{ item[1] }}'
|
||||||
with_nested:
|
with_nested:
|
||||||
- ['postgres_cache_', 'postgres_connections_', 'postgres_locks_', 'postgres_querylength_', 'postgres_scans_', 'postgres_size_', 'postgres_transactions_', 'postgres_tuples_']
|
- ['postgres_cache_', 'postgres_connections_', 'postgres_locks_', 'postgres_querylength_', 'postgres_scans_', 'postgres_size_', 'postgres_transactions_', 'postgres_tuples_']
|
||||||
- '{{postgresql_databases}}'
|
- '{{ postgresql_databases }}'
|
||||||
notify: restart munin-node
|
notify: restart munin-node
|
||||||
when: etc_munin_plugins.stat.exists and usr_share_munin_plugins.stat.exists
|
when: etc_munin_plugins.stat.exists and usr_share_munin_plugins.stat.exists
|
||||||
|
|
|
@ -35,7 +35,7 @@
|
||||||
lineinfile:
|
lineinfile:
|
||||||
name: /etc/nagios/nrpe.d/evolix.cfg
|
name: /etc/nagios/nrpe.d/evolix.cfg
|
||||||
regexp: '^command\[check_pgsql\]='
|
regexp: '^command\[check_pgsql\]='
|
||||||
line: 'command[check_pgsql]=/usr/lib/nagios/plugins/check_pgsql -H localhost -l nrpe -p "{{postgresql_nrpe_password.stdout}}"'
|
line: 'command[check_pgsql]=/usr/lib/nagios/plugins/check_pgsql -H localhost -l nrpe -p "{{ postgresql_nrpe_password.stdout }}"'
|
||||||
notify: restart nagios-nrpe-server
|
notify: restart nagios-nrpe-server
|
||||||
when: postgresql_create_nrpe_user.changed
|
when: postgresql_create_nrpe_user.changed
|
||||||
when: nrpe_evolix_config.stat.exists
|
when: nrpe_evolix_config.stat.exists
|
||||||
|
|
|
@ -10,8 +10,8 @@
|
||||||
|
|
||||||
- name: Install postgresql package
|
- name: Install postgresql package
|
||||||
apt:
|
apt:
|
||||||
name: '{{item}}'
|
name: '{{ item }}'
|
||||||
with_items:
|
with_items:
|
||||||
- "postgresql-{{postgresql_version}}"
|
- "postgresql-{{ postgresql_version }}"
|
||||||
- ptop
|
- ptop
|
||||||
- libdbd-pg-perl
|
- libdbd-pg-perl
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
|
|
||||||
- name: Add PGDG repository
|
- name: Add PGDG repository
|
||||||
apt_repository:
|
apt_repository:
|
||||||
repo: "deb http://apt.postgresql.org/pub/repos/apt/ {{ansible_distribution_release}}-pgdg main"
|
repo: "deb http://apt.postgresql.org/pub/repos/apt/ {{ ansible_distribution_release }}-pgdg main"
|
||||||
update_cache: yes
|
update_cache: yes
|
||||||
|
|
||||||
- name: Add GPG key for PGDG repository
|
- name: Add GPG key for PGDG repository
|
||||||
|
|
Loading…
Reference in a new issue