Skip to content

Commit 9dec3b7

Browse files
authored
Merge pull request #1 from roles-ansible/os
create warning if OS is not supported
2 parents 86f9536 + a4410fa commit 9dec3b7

File tree

2 files changed

+12
-18
lines changed

2 files changed

+12
-18
lines changed

README.md

+1-18
Original file line numberDiff line numberDiff line change
@@ -69,27 +69,10 @@ This role is tested with [these github-action](https://github.com/search?q=topic
6969
If you want to find out more about our tests, please have a look at the github marketplace.
7070
7171
| test status | Github Marketplace |
72-
| :---------: | :----------------: |
72+
| :--------- | :---------------- |
7373
| [![Travis Build Status](https://travis-ci.org/roles-ansible/role_install-epel-release.svg?branch=master)](https://travis-ci.org/roles-ansible/role_install-epel-release) | [.travis.yml](https://github.com/roles-ansible/role_install-epel-release/blob/master/.travis.yml) |
7474
| [![Ansible check centos:latest](https://github.com/roles-ansible/role_install-epel-release/workflows/Ansible%20check%20centos:latest/badge.svg)](https://github.com/roles-ansible/role_install-epel-release/actions?query=workflow%3A%22Ansible+check+centos%3Alatest%22) | [ansible test with centos:latest](https://github.com/roles-ansible/role_install-epel-release/blob/master/.travis.yml) | [ansible test with centos latest](https://github.com/marketplace/actions/check-ansible-centos-latest) |
7575
| [![Ansible check centos:centos8](https://github.com/roles-ansible/role_install-epel-release/workflows/Ansible%20check%20centos:centos8/badge.svg)](https://github.com/roles-ansible/role_install-epel-release/actions?query=workflow%3A%22Ansible+check+centos%3Acentos8%22) | [ansible test with centos 8](https://github.com/marketplace/actions/check-ansible-centos-centos8) |
7676
| [![Ansible check centos:centos7](https://github.com/roles-ansible/role_install-epel-release/workflows/Ansible%20check%20centos:centos7/badge.svg)](https://github.com/roles-ansible/role_install-epel-release/actions?query=workflow%3A%22Ansible+check+centos%3Acentos7%22) | [ansible test with centos 7](https://github.com/marketplace/actions/check-ansible-centos-centos7) |
7777
| [![Ansible check centos:centos6](https://github.com/roles-ansible/role_install-epel-release/workflows/Ansible%20check%20centos:centos6/badge.svg)](https://github.com/roles-ansible/role_install-epel-release/actions?query=workflow%3A%22Ansible+check+centos%3Acentos6%22) | [ansible test with centos 6](https://github.com/marketplace/actions/check-ansible-centos-centos6) |
7878
| [![Ansible Lint check](https://github.com/roles-ansible/role_install-epel-release/workflows/Ansible%20Lint%20check/badge.svg)](https://github.com/roles-ansible/role_install-epel-release/actions?query=workflow%3A%22Ansible+Lint+check%22) | [ansible linting test](https://github.com/marketplace/actions/ansible-lint) |
79-
80-
81-
WIP
82-
----
83-
84-
```
85-
WORK IN PROGRESS
86-
87-
missing:
88-
- os detection (RHEL)
89-
90-
working:
91-
- docs
92-
- epel install on centos 7
93-
- github-actions
94-
- vars
95-
```

tasks/main.yml

+11
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@
2020
state: present
2121
fingerprint: "{{ epel_repo['fingerprint'][ ansible_distribution_major_version ] }}"
2222
become: true
23+
when:
24+
- ansible_os_family == 'RedHat'
25+
- ansible_distribution != 'Fedorra'
2326

2427
- name: Install EPEL repo
2528
become: true
@@ -29,3 +32,11 @@
2932
register: result
3033
until: result is succeeded
3134
retries: 3
35+
when:
36+
- ansible_os_family == 'RedHat'
37+
- ansible_distribution != 'Fedorra'
38+
39+
- name: info for fedora and non RHEL
40+
pause:
41+
prompt: "Please notice this role is designed to work only with RHEL/CentOS 6,7 and 8"
42+
when: ansible_os_family != 'RedHat' or ansible_distribution == 'Fedorra'

0 commit comments

Comments
 (0)