Skip to content
Snippets Groups Projects
Commit c40eeeb2 authored by jurgenhaas's avatar jurgenhaas
Browse files

Update to 0.10.4 and use Python3

parent db5cde56
Branches
No related tags found
No related merge requests found
---
fail2ban_version: 0.10.2
fail2ban_version: 0.10.4
......@@ -2,7 +2,14 @@
# file: roles/fail2ban/tasks/install.yml
- name: Download Archive
shell: 'wget "https://github.com/fail2ban/fail2ban/archive/{{ fail2ban_version }}.tar.gz" -O "/tmp/fail2ban.tar.gz"'
get_url:
url: https://github.com/fail2ban/fail2ban/archive/{{ fail2ban_version }}.tar.gz
dest: /tmp/fail2ban.tar.gz
force: yes
owner: root
group: root
mode: 0664
validate_certs: yes
when: fail2ban_local_archive is not defined
- name: Copy Archive
......@@ -12,24 +19,17 @@
remote_src: yes
when: fail2ban_local_archive is defined
# TODO: Enable when all hosts are on 16.04
# get_url:
# url: https://github.com/fail2ban/fail2ban/archive/{{ fail2ban_version }}.tar.gz
# dest: /tmp/fail2ban.tar.gz
# force: yes
# owner: root
# group: root
# mode: 0664
# validate_certs: yes
- name: Extract archive
unarchive:
src: /tmp/fail2ban.tar.gz
dest: /tmp
remote_src: yes
- name: Fix for Python3
command: sed -i 's/xrange/range/g' /tmp/fail2ban-{{ fail2ban_version }}/fail2ban/__init__.py
- name: Install
shell: python setup.py install
shell: python3 setup.py install
args:
chdir: /tmp/fail2ban-{{ fail2ban_version }}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment