Use variable method for listing package installs in ubuntu/roles/icinga-client/tasks/main.yml

This commit is contained in:
staticsafe 2019-02-03 13:35:00 -05:00
parent 7bfa5fa8d1
commit e0f2bedf62
1 changed files with 5 additions and 4 deletions

View File

@ -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/