Browse Source

Make install subkey async

Anuj Bansal 3 years ago
parent
commit
017d44dfb4
1 changed files with 12 additions and 1 deletions
  1. 12 1
      devops/infrastructure/roles/admin/tasks/main.yml

+ 12 - 1
devops/infrastructure/roles/admin/tasks/main.yml

@@ -7,7 +7,7 @@
 
 - name: Copy bash_profile content to bashrc for non-interactive sessions
   blockinfile:
-    block: "{{ bash_data.stdout }}"
+    block: '{{ bash_data.stdout }}'
     path: ~/.bashrc
     insertbefore: BOF
 
@@ -16,3 +16,14 @@
 
 - name: Install subkey
   shell: cargo install --force subkey --git https://github.com/paritytech/substrate --version 2.0.1 --locked
+  async: 3600
+  poll: 0
+  register: install_result
+
+- name: Check whether install subkey task has finished
+  async_status:
+    jid: '{{ install_result.ansible_job_id }}'
+  register: job_result
+  until: job_result.finished
+  retries: 36
+  delay: 100