Browse Source

Add comments to ansible playbooks

Anuj Bansal 3 years ago
parent
commit
ff2ecd2e9d

+ 3 - 0
devops/infrastructure/build-arm64-playbook.yml

@@ -30,6 +30,7 @@
             tag: '{{ tag_name }}'
             push: yes
             source: build
+          # Run in async fashion for max duration of 2 hours
           async: 7200
           poll: 0
           register: build_result
@@ -39,7 +40,9 @@
             jid: '{{ build_result.ansible_job_id }}'
           register: job_result
           until: job_result.finished
+          # Max number of times to check for status
           retries: 72
+          # Check for the status every 100s
           delay: 100
 
       always:

+ 3 - 0
devops/infrastructure/roles/admin/tasks/main.yml

@@ -16,6 +16,7 @@
 
 - name: Install subkey
   shell: cargo install --force subkey --git https://github.com/paritytech/substrate --version 2.0.1 --locked
+  # Run in async fashion for max duration of 1 hr
   async: 3600
   poll: 0
   register: install_result
@@ -25,5 +26,7 @@
     jid: '{{ install_result.ansible_job_id }}'
   register: job_result
   until: job_result.finished
+  # Max number of times to check for status
   retries: 36
+  # Check for the status every 100s
   delay: 100

+ 7 - 4
devops/infrastructure/roles/common/tasks/run-setup-build.yml

@@ -2,25 +2,28 @@
 # Run setup and build code
 
 - name: Creat bash profile file
-  command: "touch /home/ubuntu/.bash_profile"
+  command: 'touch /home/ubuntu/.bash_profile'
 
 - name: Run setup script
   command: ./setup.sh
   args:
-    chdir: "{{ remote_code_path }}"
+    chdir: '{{ remote_code_path }}'
 
 - name: Build joystream node
   shell: . ~/.bash_profile && yarn cargo-build
   args:
-    chdir: "{{ remote_code_path }}"
+    chdir: '{{ remote_code_path }}'
+  # Run in async fashion for max duration of 1 hr
   async: 3600
   poll: 0
   register: build_result
 
 - name: Check on build async task
   async_status:
-    jid: "{{ build_result.ansible_job_id }}"
+    jid: '{{ build_result.ansible_job_id }}'
   register: job_result
   until: job_result.finished
+  # Max number of times to check for status
   retries: 36
+  # Check for the status every 100s
   delay: 100