From 892d307395f6dd9d68fdc0907df869f76d5cc128 Mon Sep 17 00:00:00 2001 From: Andrew Rothstein Date: Tue, 27 Oct 2020 22:54:35 -0400 Subject: [PATCH] improved logging --- tasks/main.yml | 21 ++++++++++----------- vars/main.yml | 3 +++ 2 files changed, 13 insertions(+), 11 deletions(-) diff --git a/tasks/main.yml b/tasks/main.yml index 241ebbc..a2cc2f4 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -9,7 +9,7 @@ skip: true paths: - '{{ role_path }}/vars' -- name: check for install... +- name: check for install in {{ matchbox_install_dir }} become: yes become_user: root stat: @@ -18,31 +18,30 @@ register: matchbox_binary - when: not matchbox_binary.stat.exists block: - - name: download tgz.. + - name: downloading {{ matchbox_tgz_url }} become: yes become_user: root get_url: url: '{{ matchbox_tgz_url }}' - dest: /tmp/{{ matchbox_tgz }} + dest: '{{ matchbox_tmp_tgz }}' checksum: '{{ matchbox_checksum }}' mode: 0644 - - - name: unarchive... + - name: unarchiving {{ matchbox_tmp_tgz }} to {{ matchbox_install_parent_dir }} become: yes become_user: root unarchive: remote_src: yes - src: /tmp/{{ matchbox_tgz }} + src: '{{ matchbox_tmp_tgz }}' dest: '{{ matchbox_install_parent_dir }}' creates: '{{ matchbox_install_dir }}' always: - - name: cleanup... + - name: rm {{ matchbox_tmp_tgz }} become: yes become_user: root file: - path: /tmp/{{ matchbox_tgz }} + path: '{{ matchbox_tmp_tgz }}' state: absent -- name: link... +- name: linking {{ matchbox_link_dir }} to {{ matchbox_install_dir }} become: yes become_user: root file: @@ -50,10 +49,10 @@ dest: '{{ matchbox_link_dir }}' state: link -- name: link executable... +- name: linking {{ matchbox_link }} to {{ matchbox_install_exe }} become: yes become_user: root file: - src: '{{ matchbox_link_dir }}/matchbox' + src: '{{ matchbox_install_exe }}' dest: '{{ matchbox_link }}' state: link diff --git a/vars/main.yml b/vars/main.yml index 5b0a50b..a19915f 100644 --- a/vars/main.yml +++ b/vars/main.yml @@ -4,9 +4,12 @@ matchbox_platform: '{{ matchbox_os }}-{{ matchbox_arch }}' matchbox_name: matchbox-{{ matchbox_ver }}-{{ matchbox_platform }} matchbox_tgz: '{{ matchbox_name }}.tar.gz' +matchbox_tmp_tgz: /tmp/{{ matchbox_tgz }} matchbox_tgz_url: '{{ matchbox_mirror }}/{{ matchbox_ver }}/{{ matchbox_tgz }}' matchbox_checksum: '{{ matchbox_checksums[matchbox_ver][matchbox_platform] }}' matchbox_install_dir: '{{ matchbox_install_parent_dir }}/{{ matchbox_name }}' +matchbox_install_exe: '{{ matchbox_install_dir }}/matchbox' + matchbox_link_dir: '{{ matchbox_install_parent_dir }}/matchbox' matchbox_link: '{{ matchbox_install_parent_dir }}/bin/matchbox'