Skip to content

Commit

Permalink
Fix deprecation warnings on Ansible 2.7
Browse files Browse the repository at this point in the history
and drop Ansible 2.4 support...
  • Loading branch information
HanXHX committed Jan 22, 2019
1 parent 304cda4 commit 9f7a369
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 14 deletions.
2 changes: 0 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
env:
- PLATFORM='docker-debian-jessie' ANSIBLE_VERSION='ansible>=2.4,<2.5'
- PLATFORM='docker-debian-stretch' ANSIBLE_VERSION='ansible>=2.4,<2.5'
- PLATFORM='docker-debian-jessie' ANSIBLE_VERSION='ansible>=2.5,<2.6'
- PLATFORM='docker-debian-stretch' ANSIBLE_VERSION='ansible>=2.5,<2.6'
- PLATFORM='docker-debian-jessie' ANSIBLE_VERSION='ansible>=2.6,<2.7'
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Supported versions
Requirements
------------

None.
Min Ansible 2.5

Role Variables
--------------
Expand Down
7 changes: 5 additions & 2 deletions meta/main.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
---
galaxy_info:
author: Emilien Mantel
description: Normalize and prepare a Debian/Devuan server
description: Normalize and prepare a Debian/Devuan/Kali Linux server
company:
license: GPLv2
min_ansible_version: 2.4
min_ansible_version: 2.5
platforms:
- name: Debian
versions:
Expand All @@ -14,6 +14,9 @@ galaxy_info:
versions:
- jessie
- ascii
- name: Kali Linux
versions:
- rolling-kali
galaxy_tags:
- networking
- packaging
Expand Down
8 changes: 2 additions & 6 deletions tasks/apt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,19 +64,15 @@

- name: APT | Uninstall packages
apt:
pkg: "{{ item }}"
pkg: "{{ dbs_uninstall_packages }}"
state: absent
with_items: "{{ dbs_uninstall_packages }}"

- name: APT | Install few packages
apt:
pkg: "{{ item }}"
pkg: "{{ lookup('flattened', dbs_packages, dbs_distro_packages) }}"
state: present
update_cache: yes
cache_valid_time: 3600
with_flattened:
- "{{ dbs_packages }}"
- "{{ dbs_distro_packages }}"

- name: APT | Install Intel Microcode if needed
apt:
Expand Down
3 changes: 1 addition & 2 deletions tasks/nosystemd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@

- name: APT | Install sysvinit
apt:
pkg: "{{ item }}"
pkg: "{{ dbs_sysvinit_packages }}"
state: present
with_items: "{{ dbs_sysvinit_packages }}"
register: sysv_installed

- block:
Expand Down
2 changes: 1 addition & 1 deletion tasks/timezone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
dbs_timezone_legacy_mode: true
when: >
ansible_distribution == 'Debian' and
ansible_distribution_major_version | version_compare(9, 'ge')
ansible_distribution_major_version is version_compare(9, 'ge')
- name: TIMEZONE | Set
timezone:
Expand Down

0 comments on commit 9f7a369

Please sign in to comment.