Skip to content

Commit

Permalink
Change: Add support for python3 and update min_ansible_version to 2.6
Browse files Browse the repository at this point in the history
  • Loading branch information
Taylor Kimball committed Oct 13, 2018
1 parent 57ef892 commit cc7273a
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 8 deletions.
4 changes: 3 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
---
language: python
python: "2.7"
python:
- "2.7"
- "3.6"
sudo: required
install:
- pip install ansible
Expand Down
2 changes: 1 addition & 1 deletion meta/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ galaxy_info:
author: tkimball83
description: RHEL/CentOS - ELRepo Project
license: GPLv3
min_ansible_version: 2.5
min_ansible_version: 2.6
platforms:
- name: EL
versions:
Expand Down
16 changes: 12 additions & 4 deletions tasks/elrepo_kernel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,13 @@
enablerepo: "{{ elrepo_enablerepo|join(',') }}"
name: "{{ item }}"
state: absent
with_items:
loop:
- kernel-devel
- kernel-tools
- kernel-tools-libs
- kernel-headers
loop_control:
label: "{{ item }}"

- name: Appending elrepo-kernel to elrepo_enablerepo list
set_fact:
Expand All @@ -29,10 +31,12 @@
name: "{{ item }}"
state: present
register: elrepo_kernel_installed
with_items:
loop:
- "kernel-{{ elrepo_kernel_version }}"
- "kernel-{{ elrepo_kernel_version }}-devel"
- "kernel-{{ elrepo_kernel_version }}-headers"
loop_control:
label: "{{ item }}"

- name: Ensure that the kernel tools packages are installed
become: true
Expand All @@ -43,9 +47,11 @@
enablerepo: "{{ elrepo_enablerepo|join(',') }}"
name: "{{ item }}"
state: present
with_items:
loop:
- "kernel-{{ elrepo_kernel_version }}-tools"
- "kernel-{{ elrepo_kernel_version }}-tools-libs"
loop_control:
label: "{{ item }}"
when:
- elrepo_dist == '7'
- elrepo_kernel_installed is changed
Expand Down Expand Up @@ -77,7 +83,9 @@
enablerepo: "{{ elrepo_enablerepo|join(',') }}"
name: "{{ item }}"
state: present
with_items: "{{ elrepo_packages }}"
loop: "{{ elrepo_packages }}"
loop_control:
label: "{{ item }}"
when:
- elrepo_packages|length > 0
- elrepo_yum is success
Expand Down
4 changes: 3 additions & 1 deletion tasks/elrepo_repository.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,9 @@
enablerepo: "{{ elrepo_enablerepo|join(',') }}"
name: "{{ item }}"
state: present
with_items: "{{ elrepo_packages }}"
loop: "{{ elrepo_packages }}"
loop_control:
label: "{{ item }}"
when:
- elrepo_packages|length > 0
- elrepo_yum is success
Expand Down
2 changes: 1 addition & 1 deletion tests/test.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
- hosts: localhost
remote_user: root
connection: local
roles:
- ansible-role-elrepo
...

0 comments on commit cc7273a

Please sign in to comment.