Skip to content

Commit

Permalink
improved logging
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewrothstein committed Oct 28, 2020
1 parent ebe70ff commit 892d307
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 11 deletions.
21 changes: 10 additions & 11 deletions tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -18,42 +18,41 @@
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:
src: '{{ matchbox_install_dir }}'
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
3 changes: 3 additions & 0 deletions vars/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'

0 comments on commit 892d307

Please sign in to comment.