From d50b37201f08721fc523c2155dfad1d4a02a8821 Mon Sep 17 00:00:00 2001 From: Ivan Kiselev Date: Mon, 23 Jan 2017 12:13:55 +0700 Subject: [PATCH 1/3] added pam_nofile limits change task --- defaults/main.yml | 2 ++ tasks/main.yml | 14 ++++++++++++++ 2 files changed, 16 insertions(+) diff --git a/defaults/main.yml b/defaults/main.yml index 481196d..bbae907 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -44,4 +44,6 @@ prometheus_config_flags: 'alertmanager.url': '{{ prometheus_alertmanager_url }}' prometheus_config_flags_extra: {} +prometheus_pam_domain: "prometheus" +prometheus_pam_nofile_value: "1024" diff --git a/tasks/main.yml b/tasks/main.yml index 4d76447..f555131 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -106,6 +106,20 @@ notify: - restart prometheus +- name: change pam nofile limits for prometheus + pam_limits: + domain: "{{ prometheus_pam_domain }}" + limit_item: nofile + limit_type: "{{ item }}" + value: "{{ prometheus_pam_nofile_value }}" + use_max: yes + with_itmes: + - soft + - hard + notify: + - restart prometheus + + - name: ensure prometheus service is enabled service: name: prometheus From b8d201e3a545550eecba99f72dfc928a23819e37 Mon Sep 17 00:00:00 2001 From: Ivan Kiselev Date: Mon, 23 Jan 2017 12:14:43 +0700 Subject: [PATCH 2/3] formating --- tasks/main.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/tasks/main.yml b/tasks/main.yml index f555131..d853c95 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -119,7 +119,6 @@ notify: - restart prometheus - - name: ensure prometheus service is enabled service: name: prometheus From b6be39edfc3934dc61ae801140a97522196a4c21 Mon Sep 17 00:00:00 2001 From: Ivan Kiselev Date: Mon, 23 Jan 2017 12:21:46 +0700 Subject: [PATCH 3/3] fixed typo --- tasks/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasks/main.yml b/tasks/main.yml index d853c95..c12bfe3 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -113,7 +113,7 @@ limit_type: "{{ item }}" value: "{{ prometheus_pam_nofile_value }}" use_max: yes - with_itmes: + with_items: - soft - hard notify: