From f2cac21198a8d3e9a6eec28f9b7de3fd06ce95f8 Mon Sep 17 00:00:00 2001 From: ahochor Date: Thu, 25 Oct 2018 12:17:18 +0200 Subject: [PATCH 1/2] update --- tasks/install.yml | 7 +++---- tasks/install_hatop.yml | 2 +- templates/haproxy_exporter.service.j2 | 2 +- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/tasks/install.yml b/tasks/install.yml index 2b87344..e8bf5b4 100644 --- a/tasks/install.yml +++ b/tasks/install.yml @@ -8,13 +8,12 @@ - name: Install HAProxy Packages package: - name: "{{ item }}" - state: "installed" + name: "{{ haproxy_distro_packages }}" + state: present register: install_packages - until: install_packages|success + until: install_packages is success retries: 5 delay: 2 - with_items: "{{ haproxy_distro_packages }}" - name: Create haproxy conf.d dir file: diff --git a/tasks/install_hatop.yml b/tasks/install_hatop.yml index 9eb28ae..84a60da 100644 --- a/tasks/install_hatop.yml +++ b/tasks/install_hatop.yml @@ -2,7 +2,7 @@ - name: Install HATop from repository package: name: hatop - state: installed + state: present when: ansible_os_family == "Debian" - block: diff --git a/templates/haproxy_exporter.service.j2 b/templates/haproxy_exporter.service.j2 index d39401b..d88188f 100644 --- a/templates/haproxy_exporter.service.j2 +++ b/templates/haproxy_exporter.service.j2 @@ -5,7 +5,7 @@ After=network.target [Service] Type=simple PIDFile=/var/run/haproxy_exporter.pid -ExecStart=/opt/haproxy_exporter/haproxy_exporter {% for flag, flag_value in haproxy_exporter_config_flags.iteritems() %}{{ '-' if (haproxy_exporter_version |version_compare('0.8.0', '>=')) else ''}}-{{ flag }}={{ flag_value }} {% endfor %} +ExecStart=/opt/haproxy_exporter/haproxy_exporter {% for flag, flag_value in haproxy_exporter_config_flags.iteritems() %}{{ '-' if (haproxy_exporter_version is version_compare('0.8.0', '>=')) else ''}}-{{ flag }}={{ flag_value }} {% endfor %} SyslogIdentifier=haproxy_exporter Restart=always From 86d71840f3d5a794570b9518544e3d8bcb5b5040 Mon Sep 17 00:00:00 2001 From: agatahochor Date: Thu, 25 Oct 2018 13:53:51 +0200 Subject: [PATCH 2/2] Update main.yml --- meta/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta/main.yml b/meta/main.yml index 9033051..9c3fe26 100644 --- a/meta/main.yml +++ b/meta/main.yml @@ -4,7 +4,7 @@ galaxy_info: description: HAProxy loadbalancer company: Sointeractive license: MIT - min_ansible_version: 2.2 + min_ansible_version: 2.4 platforms: - name: Ubuntu versions: