diff --git a/user.yml b/user.yml index 4f919f1..d3c6c93 100644 --- a/user.yml +++ b/user.yml @@ -325,3 +325,61 @@ with_items: "{{ user.firefox_profiles | default([]) }}" tags: - firefox + +- block: + - name: set portfolio performance version + set_fact: + portfolio_performace_version: "0.47.0" + + - name: look of current installation + stat: + path: /home/{{ user.name }}/.opt/portfolio-performance-{{ portfolio_performace_version }} + register: stat_portfolio_performance_installation + + - name: create temporary directory + tempfile: + state: directory + register: tempdir + + - block: + - name: download portfolio performance + get_url: + url: https://github.com/buchen/portfolio/releases/download/{{ portfolio_performace_version }}/PortfolioPerformance-{{ portfolio_performace_version }}-linux.gtk.x86_64.tar.gz + dest: "{{ tempdir.path }}/PortfolioPerformance.{{ portfolio_performace_version }}.tar.gz" + + - name: create destination directory + file: + state: directory + path: "{{ tempdir.path }}/PortfolioPerformance" + when: not stat_portfolio_performance_installation.stat.exists + + - name: unpack portfolio performance + unarchive: + src: "{{ tempdir.path }}/PortfolioPerformance.{{ portfolio_performace_version }}.tar.gz" + owner: "{{ user.name }}" + group: "{{ user_group_name }}" + mode: '0755' + dest: "{{ tempdir.path }}/PortfolioPerformance" + remote_src: true + + - name: install portfolio performance + synchronize: + src: "{{ tempdir.path }}/PortfolioPerformance" + dest: /home/{{ user.name }}/.opt/portfolio-performance-{{ portfolio_performace_version }} + recursive: true + checksum: true + delete: true + + when: not stat_portfolio_performance_installation.stat.exists + + - name: link portfolio performance + file: + src: /home/{{ user.name }}/.opt/portfolio-performance-{{ portfolio_performace_version }}/PortfolioPerformance/portfolio/PortfolioPerformance + dest: /home/{{ user.name }}/.optbin/portfolio-performance + owner: "{{ user.name }}" + group: "{{ user_group_name }}" + state: link + force: true + + tags: + - portfolio-performance