From 45ddb507ef7cc3712a77b5d8ba208eb93144a5e2 Mon Sep 17 00:00:00 2001 From: Ryan Cavicchioni Date: Sun, 14 Apr 2024 17:47:55 -0500 Subject: [PATCH] mtail: remove dead code --- roles/mtail/defaults/main.yaml | 2 +- roles/mtail/tasks/pre.yaml | 38 ---------------------------------- 2 files changed, 1 insertion(+), 39 deletions(-) diff --git a/roles/mtail/defaults/main.yaml b/roles/mtail/defaults/main.yaml index 0c0ed0e..bdc7ef4 100644 --- a/roles/mtail/defaults/main.yaml +++ b/roles/mtail/defaults/main.yaml @@ -12,7 +12,7 @@ mtail_service_enabled: yes mtail_version_regex: ^mtail version (\S+) mtail_github_project_url: https://github.com/google/mtail -mtail_release_file: "mtail_{{ mtail_version }}_{{ ansible_system | capitalize }}_{{ ansible_architecture }}.tar.gz" +mtail_release_file: "mtail_{{ mtail_version }}_{{ ansible_system | lower }}_{{ mtail_go_arch }}.tar.gz" mtail_release_url: "{{ mtail_github_project_url }}/releases/download/v{{ mtail_version }}/{{ mtail_release_file }}" mtail_download_path: "/tmp/{{ mtail_release_file }}" mtail_checksum_url: "{{ mtail_github_project_url }}/releases/download/v{{ mtail_version }}/checksums.txt" diff --git a/roles/mtail/tasks/pre.yaml b/roles/mtail/tasks/pre.yaml index 9996386..345f35b 100644 --- a/roles/mtail/tasks/pre.yaml +++ b/roles/mtail/tasks/pre.yaml @@ -1,42 +1,4 @@ --- -#- name: determine if installed -# stat: -# path: "{{ mtail_bin_path }}/mtail" -# register: st -# -#- name: set mtail_installed -# set_fact: -# mtail_installed: "{{ st.stat.exists | bool }}" -# -#- block: -# - name: determine latest version -# uri: -# url: https://api.github.com/repos/google/mtail/releases/latest -# return_content: true -# body_format: json -# register: _latest_version -# until: _latest_version.status == 200 -# retries: 3 -# -# - name: set mtail_version -# set_fact: -# mtail_version: "{{ _latest_version.json['tag_name'] | regex_replace('^v', '') }}" -# -#- block: -# - name: determine installed version -# command: "{{ mtail_bin_path }}/mtail --version" -# register: _installed_version_string -# changed_when: false -# -# - name: set mtail_local_version -# set_fact: -# mtail_local_version: "{{ _installed_version_string.stdout | regex_search(mtail_version_regex, '\\1') | first }}" -# when: mtail_installed -# -#- name: set mtail_local_version to 0 -# set_fact: -# mtail_local_version: "0" -# when: not mtail_installed - name: determine if installed stat: path: "{{ mtail_bin_path }}/mtail"