From fc0ae206cc1bfdddb23f73de79060a66546b5040 Mon Sep 17 00:00:00 2001 From: James Antill Date: Tue, 11 Jun 2019 10:23:44 -0400 Subject: [PATCH] apache: Convert from dnf/with_items to package/name. --- roles/apache/tasks/main.yml | 24 +++++++----------------- 1 file changed, 7 insertions(+), 17 deletions(-) diff --git a/roles/apache/tasks/main.yml b/roles/apache/tasks/main.yml index 3d319942a3..9b46352592 100644 --- a/roles/apache/tasks/main.yml +++ b/roles/apache/tasks/main.yml @@ -1,25 +1,15 @@ --- # install apache(httpd) -- name: install apache (yum) - package: name={{ item }} state=present - with_items: - - httpd - - httpd-tools +- name: install apache (package) + package: + state: present + name: + - httpd + - httpd-tools tags: - packages - apache - when: ansible_distribution_major_version|int < 22 - -# install apache(httpd) -- name: install apache (dnf) - dnf: name={{ item }} state=present - with_items: - - httpd - - httpd-tools - tags: - - packages - - apache - when: ansible_distribution_major_version|int > 21 and ansible_cmdline.ostree is not defined + when: ansible_cmdline.ostree is not defined - name: set apache running/enabled service: name=httpd enabled=yes