Skip to content

Commit

Permalink
Merge pull request #2 from jwhb/feature-el-support
Browse files Browse the repository at this point in the history
Add support for Enterprise Linux
  • Loading branch information
chasinglogic authored Jul 29, 2020
2 parents 22366c0 + 509b7e7 commit f52ab01
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 10 deletions.
7 changes: 0 additions & 7 deletions tasks/fedora.yml

This file was deleted.

11 changes: 8 additions & 3 deletions tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,19 @@
become_user: root
package:
name: iptables
state: present

- include_tasks: fedora.yml
when: ansible_distribution == "Fedora"
- name: Include tasks for Red Hat OS family
include_tasks: redhat.yml
when: (ansible_distribution == 'Fedora' and ansible_distribution_major_version is version('28', '>=')) or
(ansible_distribution in ['RedHat', 'CentOS'] and ansible_distribution_major_version is version('7', '>='))

- include_tasks: ubuntu.yml
- name: Include tasks for Ubuntu
include_tasks: ubuntu.yml
when: ansible_distribution == "Ubuntu"

- include_tasks: podman_service.yml
loop: "{{ podman_services }}"
loop_control:
loop_var: service

17 changes: 17 additions & 0 deletions tasks/redhat.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---

- name: RedHat DNF | Install Podman suite of tools
become: true
become_user: root
dnf:
name: "{{ podman_tools }}"
when: (ansible_distribution == 'Fedora' and ansible_distribution_major_version is version('28', '>=')) or
(ansible_distribution in ['RedHat', 'CentOS'] and ansible_distribution_major_version is version('8', '>='))

- name: RedHat YUM | Install Podman suite of tools
become: true
become_user: root
yum:
name: "{{ podman_tools }}"
when: (ansible_distribution in ['RedHat', 'CentOS'] and ansible_distribution_major_version is version('7', '=='))

0 comments on commit f52ab01

Please sign in to comment.