From b459cb9f0be93378dfdbf653cf39b91f7fa4c94b Mon Sep 17 00:00:00 2001 From: Al Date: Wed, 25 Dec 2024 17:28:07 +0700 Subject: [PATCH] chore: improve methods to download polkachu playbook --- roles/setup_install_penumbra/tasks/main.yaml | 25 +++++++++++++++----- 1 file changed, 19 insertions(+), 6 deletions(-) diff --git a/roles/setup_install_penumbra/tasks/main.yaml b/roles/setup_install_penumbra/tasks/main.yaml index 28ec857..558038b 100644 --- a/roles/setup_install_penumbra/tasks/main.yaml +++ b/roles/setup_install_penumbra/tasks/main.yaml @@ -133,15 +133,28 @@ group: "{{ default_user }}" when: not cometbft_dir.stat.exists + #NOTE: i dont know if this will work, but the wget cmd that commented out below will be working - name: Download Polkachu Cometbft snapshot - ansible.builtin.shell: - cmd: "wget -O {{ default_database_path }}/node0/penumbra_{{ polkachu_version }}.tar.lz4 https://snapshots.polkachu.com/snapshots/penumbra/penumbra_{{ polkachu_version }}.tar.lz4 --inet4-only" - become: True + ansible.builtin.get_url: + url: "https://snapshots.polkachu.com/snapshots/penumbra/penumbra_{{ polkachu_version }}.tar.lz4" + dest: "{{ default_database_path }}/node0/penumbra_{{ polkachu_version }}.tar.lz4" + owner: "{{ default_user }}" + group: "{{ default_user }}" + mode: "0640" + force: true + become: true become_user: "{{ default_user }}" when: not cometbft_dir.stat.exists - # when: ansible_local['noderole']['node']['version'] != penumbra_version - args: - executable: /bin/bash + +# - name: Download Polkachu Cometbft snapshot +# ansible.builtin.shell: +# cmd: "wget -O {{ default_database_path }}/node0/penumbra_{{ polkachu_version }}.tar.lz4 https://snapshots.polkachu.com/snapshots/penumbra/penumbra_{{ polkachu_version }}.tar.lz4 --inet4-only" +# become: True +# become_user: "{{ default_user }}" +# when: not cometbft_dir.stat.exists +# # when: ansible_local['noderole']['node']['version'] != penumbra_version +# args: +# executable: /bin/bash - name: Extract and decompress Polkachu snapshot ansible.builtin.shell: