From 6c8b577f0edbfbb446a7d5b1809d0a6c6389c330 Mon Sep 17 00:00:00 2001 From: Jeff Geerling Date: Thu, 26 Apr 2018 22:07:42 -0500 Subject: [PATCH] Fixes #153: Add support and tests for Fedora. --- .travis.yml | 1 + meta/main.yml | 3 +++ tasks/setup-RedHat.yml | 11 ++++++++++- 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 2992c92..5fb884f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,6 +4,7 @@ services: docker env: - distro: centos7 - distro: centos6 + - distro: fedora27 - distro: ubuntu1804 - distro: ubuntu1604 - distro: ubuntu1404 diff --git a/meta/main.yml b/meta/main.yml index 2bd0b33..16fc86a 100644 --- a/meta/main.yml +++ b/meta/main.yml @@ -11,6 +11,9 @@ galaxy_info: - name: EL versions: - all + - name: Fedora + versions: + - all - name: Amazon versions: - all diff --git a/tasks/setup-RedHat.yml b/tasks/setup-RedHat.yml index 6021b9f..8ef2ac9 100644 --- a/tasks/setup-RedHat.yml +++ b/tasks/setup-RedHat.yml @@ -1,7 +1,16 @@ --- -- name: Ensure Apache is installed on RHEL. +- name: Ensure Apache is installed (via yum). yum: name: "{{ item }}" state: "{{ apache_packages_state }}" enablerepo: "{{ apache_enablerepo }}" with_items: "{{ apache_packages }}" + when: ansible_distribution != 'Fedora' + +- name: Ensure Apache is installed (via dnf). + dnf: + name: "{{ item }}" + state: "{{ apache_packages_state }}" + enablerepo: "{{ apache_enablerepo }}" + with_items: "{{ apache_packages }}" + when: ansible_distribution == 'Fedora'