From e0f2bedf62b2f60c30e1a15f508f1a3f406001e9 Mon Sep 17 00:00:00 2001 From: staticsafe Date: Sun, 3 Feb 2019 13:35:00 -0500 Subject: [PATCH] Use variable method for listing package installs in ubuntu/roles/icinga-client/tasks/main.yml --- ubuntu/roles/icinga-client/tasks/main.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/ubuntu/roles/icinga-client/tasks/main.yml b/ubuntu/roles/icinga-client/tasks/main.yml index 34439e7..9b3146e 100644 --- a/ubuntu/roles/icinga-client/tasks/main.yml +++ b/ubuntu/roles/icinga-client/tasks/main.yml @@ -6,10 +6,11 @@ - name: Add Icinga apt repository apt_repository: repo="deb https://packages.icinga.com/ubuntu icinga-{{ ansible_distribution_release }} main" state=present - name: Update apt cache and install Icinga packages - apt: name={{ item }} state=latest update_cache=yes - with_items: - - icinga2 - - monitoring-plugins + apt: name={{ packages }} state=latest update_cache=yes + vars: + packages: + - icinga2 + - monitoring-plugins - name: Ensure icinga2 systemd folder exists file: path: /etc/systemd/system/icinga2.service.d/