Python3 supported version of hatop

New hatop package has python3 support.

Change-Id: I69c01f330feb67d92b6b01fea589a35969879da2
This commit is contained in:
Satish Patel 2020-12-03 16:15:11 +00:00 committed by Dmitriy Rabotyagov
parent 7f15ec569f
commit a46106d4e7
2 changed files with 9 additions and 6 deletions

View File

@ -102,8 +102,8 @@ haproxy_ssl_letsencrypt_acl:
backend_name: letsencrypt
# hatop extra package URL and checksum
haproxy_hatop_download_url: "https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/hatop/hatop-0.7.7.tar.gz"
haproxy_hatop_download_checksum: "sha256:0b9fc1b84ce4e469a069e3a3c7c1b5eea10e6bb24bc66bd32af453acd54636ab"
haproxy_hatop_download_url: "https://github.com/jhunt/hatop/archive/v0.8.0.tar.gz"
haproxy_hatop_download_checksum: "sha256:bcdab1664358ec83027957df11bbeb322df1a96d414a3ccc4e211532b82c4ad2"
# Where the extra package download is executed from.
# Options are ['deployment-host', 'target-host']

View File

@ -26,15 +26,16 @@
- name: Ensure haproxy_hatop_download_path exists
file:
path: "{{ haproxy_hatop_download_path }}"
path: "{{ haproxy_hatop_download_path }}/{{ haproxy_hatop_download_url | basename | replace('.tar.gz', '') }}"
state: directory
delegate_to: "{{ (haproxy_hatop_downloader == 'deployment-host') | ternary('localhost', inventory_hostname) }}"
- name: Download extra package
get_url:
url: "{{ haproxy_hatop_download_url }}"
dest: "{{ haproxy_hatop_download_path }}"
dest: "{{ haproxy_hatop_download_path }}/{{ haproxy_hatop_download_url | basename }}"
validate_certs: "{{ haproxy_hatop_download_validate_certs }}"
checksum: "{{ haproxy_hatop_download_checksum }}"
register: fetch_url
until: fetch_url is success
retries: 3
@ -45,12 +46,14 @@
unarchive:
src: "{{ haproxy_hatop_download_path }}/{{ haproxy_hatop_download_url | basename }}"
remote_src: "{{ (haproxy_hatop_downloader == 'deployment-host') | ternary('no', 'yes') }}"
dest: "/opt"
dest: "{{ haproxy_hatop_download_path }}/{{ haproxy_hatop_download_url | basename | replace('.tar.gz', '') }}"
extra_opts:
- --strip-components=1
- name: Install HATop
command: "install -m 755 bin/hatop /usr/local/bin"
args:
chdir: "/opt/{{ haproxy_hatop_download_url | basename | replace('.tar.gz', '') }}"
chdir: "{{ haproxy_hatop_download_path }}/{{ haproxy_hatop_download_url | basename | replace('.tar.gz', '') }}"
creates: "/usr/local/bin/hatop"
- include_tasks: haproxy_apparmor.yml