From 650dbadf1fdb9a86dc7cfef8ea075b3c19c7db12 Mon Sep 17 00:00:00 2001 From: Sylvain Martel Date: Thu, 15 Feb 2024 14:25:07 -0500 Subject: [PATCH 01/71] update plenum and node to latest release --- ansible/indy_node/roles/indy_node/defaults/main.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ansible/indy_node/roles/indy_node/defaults/main.yml b/ansible/indy_node/roles/indy_node/defaults/main.yml index 4557562..a9b6b66 100644 --- a/ansible/indy_node/roles/indy_node/defaults/main.yml +++ b/ansible/indy_node/roles/indy_node/defaults/main.yml @@ -1,8 +1,8 @@ --- indy_node_channel: rc indy_node_pkg: indy-node -indy_node_pkg_version: 1.13.2~rc3 -indy_plenum_pkg_version: 1.13.1~rc2 +indy_node_pkg_version: 1.13.2 +indy_plenum_pkg_version: 1.13.1 # Configuration Parameters cloud: azure @@ -20,4 +20,4 @@ indy_node_configuration: true start_indy_node: true # Don't set this, it is auto-detected -distribution_codename: null \ No newline at end of file +distribution_codename: null From 53410fd76328b8a2b194e02bcdc3fd48a3fe5e6a Mon Sep 17 00:00:00 2001 From: Sylvain Martel Date: Thu, 15 Feb 2024 14:40:53 -0500 Subject: [PATCH 02/71] init output in json --- .../roles/indy_node/tasks/configure.yml | 33 +++++++++++-------- .../roles/indy_node/templates/init_output.j2 | 3 ++ 2 files changed, 22 insertions(+), 14 deletions(-) create mode 100644 ansible/indy_node/roles/indy_node/templates/init_output.j2 diff --git a/ansible/indy_node/roles/indy_node/tasks/configure.yml b/ansible/indy_node/roles/indy_node/tasks/configure.yml index 8b1afd8..bc8dc4b 100644 --- a/ansible/indy_node/roles/indy_node/tasks/configure.yml +++ b/ansible/indy_node/roles/indy_node/tasks/configure.yml @@ -8,11 +8,11 @@ - name: Set node_alias variable set_fact: - node_alias: "{{ hostname.stdout }}" + node_alias: "{{ hostname.stdout }}" - name: Print node_alias debug: - var: node_alias + var: node_alias # ============================================================ - name: Check that required variables are specified @@ -122,17 +122,17 @@ # ---------------------------------------------------------------------------------------------------------------------------------------------------------- - name: Generate init_indy_node command set_fact: - init_indy_node_cmd: "sudo -i -u indy init_indy_node {{ node_alias }} {{ node_ip }} {{ node_port }} {{ client_ip }} {{ client_port }}" + init_indy_node_cmd: "sudo -i -u indy init_indy_node {{ node_alias }} {{ node_ip }} {{ node_port }} {{ client_ip }} {{ client_port }}" when: node_seed is undefined - name: Generate init_indy_node command with provided seed set_fact: - init_indy_node_cmd: "sudo -i -u indy init_indy_node {{ node_alias }} {{ node_ip }} {{ node_port }} {{ client_ip }} {{ client_port }} {{ node_seed }}" + init_indy_node_cmd: "sudo -i -u indy init_indy_node {{ node_alias }} {{ node_ip }} {{ node_port }} {{ client_ip }} {{ client_port }} {{ node_seed }}" when: node_seed is defined - name: Print init_indy_node command debug: - var: init_indy_node_cmd + var: init_indy_node_cmd - name: Initialize Indy Node shell: "{{ init_indy_node_cmd }}" @@ -162,14 +162,14 @@ - name: Start indy-node service block: - - name: Enable service - service: - name: indy-node - enabled: true - - name: Start service - service: - name: indy-node - state: started + - name: Enable service + service: + name: indy-node + enabled: true + - name: Start service + service: + name: indy-node + state: started become: true when: domain_transactions_genesis.stat.exists and pool_transactions_genesis.stat.exists and start_indy_node | bool # ================================================================================================= @@ -181,6 +181,11 @@ debug: msg: "ENSUE YOU RECORD THE FOLLOWING INITIALIZATION OUTPUT IN A SAFE LOCATION!" +- name: Generate JSON output from initialization results + template: + src: init_output.j2 # Your Jinja2 template file + dest: /tmp/indy_node_init_output.json + - name: Print init_indy_node result debug: var: init_indy_node_result.stdout_lines @@ -188,4 +193,4 @@ - name: Print /etc/indy/indy.env debug: var: indy_env.stdout_lines -# =============================================== \ No newline at end of file +# =============================================== diff --git a/ansible/indy_node/roles/indy_node/templates/init_output.j2 b/ansible/indy_node/roles/indy_node/templates/init_output.j2 new file mode 100644 index 0000000..cdde61a --- /dev/null +++ b/ansible/indy_node/roles/indy_node/templates/init_output.j2 @@ -0,0 +1,3 @@ +{ + "initialization_output": {{ init_indy_node_result.stdout_lines }} +} \ No newline at end of file From cb6ea3319750fe3d375a9b321424e61e77738dc3 Mon Sep 17 00:00:00 2001 From: Sylvain Martel Date: Thu, 15 Feb 2024 14:53:27 -0500 Subject: [PATCH 03/71] plenum back to rc4 --- ansible/indy_node/roles/indy_node/defaults/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ansible/indy_node/roles/indy_node/defaults/main.yml b/ansible/indy_node/roles/indy_node/defaults/main.yml index a9b6b66..ae9dc3a 100644 --- a/ansible/indy_node/roles/indy_node/defaults/main.yml +++ b/ansible/indy_node/roles/indy_node/defaults/main.yml @@ -2,7 +2,7 @@ indy_node_channel: rc indy_node_pkg: indy-node indy_node_pkg_version: 1.13.2 -indy_plenum_pkg_version: 1.13.1 +indy_plenum_pkg_version: 1.13.1~rc4 # Configuration Parameters cloud: azure From 269b35db46b40e84491b86ad1836777212a51e1c Mon Sep 17 00:00:00 2001 From: Sylvain Martel Date: Thu, 15 Feb 2024 14:56:54 -0500 Subject: [PATCH 04/71] m --- ansible/indy_node/roles/indy_node/defaults/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ansible/indy_node/roles/indy_node/defaults/main.yml b/ansible/indy_node/roles/indy_node/defaults/main.yml index ae9dc3a..72c2abc 100644 --- a/ansible/indy_node/roles/indy_node/defaults/main.yml +++ b/ansible/indy_node/roles/indy_node/defaults/main.yml @@ -1,7 +1,7 @@ --- indy_node_channel: rc indy_node_pkg: indy-node -indy_node_pkg_version: 1.13.2 +indy_node_pkg_version: 1.13.2~rc6 indy_plenum_pkg_version: 1.13.1~rc4 # Configuration Parameters From 45f3d7a7b7eda7bfc14b1c613658d5c5cae8edde Mon Sep 17 00:00:00 2001 From: Sylvain Martel Date: Thu, 15 Feb 2024 15:14:45 -0500 Subject: [PATCH 05/71] m --- .../roles/indy_node/tasks/configure.yml | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/ansible/indy_node/roles/indy_node/tasks/configure.yml b/ansible/indy_node/roles/indy_node/tasks/configure.yml index bc8dc4b..7128287 100644 --- a/ansible/indy_node/roles/indy_node/tasks/configure.yml +++ b/ansible/indy_node/roles/indy_node/tasks/configure.yml @@ -181,10 +181,19 @@ debug: msg: "ENSUE YOU RECORD THE FOLLOWING INITIALIZATION OUTPUT IN A SAFE LOCATION!" -- name: Generate JSON output from initialization results - template: - src: init_output.j2 # Your Jinja2 template file - dest: /tmp/indy_node_init_output.json +- name: Ensure json output file exists + file: + path: /tmp/indy_node_init_output.json + state: touch + +- name: Append Init JSON output to file using blockinfile + blockinfile: + path: /tmp/indy_node_init_output.json + marker: "# {mark} ANSIBLE MANAGED INIT OUTPUT" + block: | + {% raw %} + {{ lookup('template', 'init_output.j2') }} + {% endraw %} - name: Print init_indy_node result debug: From 9e6e2045e1973db6142ba49e9676d33c6827f427 Mon Sep 17 00:00:00 2001 From: Sylvain Martel Date: Thu, 15 Feb 2024 16:03:02 -0500 Subject: [PATCH 06/71] m --- ansible/indy_node/roles/indy_node/tasks/configure.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ansible/indy_node/roles/indy_node/tasks/configure.yml b/ansible/indy_node/roles/indy_node/tasks/configure.yml index 7128287..fb69e3a 100644 --- a/ansible/indy_node/roles/indy_node/tasks/configure.yml +++ b/ansible/indy_node/roles/indy_node/tasks/configure.yml @@ -183,12 +183,12 @@ - name: Ensure json output file exists file: - path: /tmp/indy_node_init_output.json + path: "{{ playbook_dir }}/indy_node_init_output.json" state: touch - name: Append Init JSON output to file using blockinfile blockinfile: - path: /tmp/indy_node_init_output.json + path: "{{ playbook_dir }}/indy_node_init_output.json" marker: "# {mark} ANSIBLE MANAGED INIT OUTPUT" block: | {% raw %} From d297a9772a2c0228eae916fd6e794e462a4d2254 Mon Sep 17 00:00:00 2001 From: Sylvain Martel Date: Thu, 15 Feb 2024 16:09:16 -0500 Subject: [PATCH 07/71] m --- ansible/indy_node/roles/indy_node/tasks/configure.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ansible/indy_node/roles/indy_node/tasks/configure.yml b/ansible/indy_node/roles/indy_node/tasks/configure.yml index fb69e3a..e8e3a5d 100644 --- a/ansible/indy_node/roles/indy_node/tasks/configure.yml +++ b/ansible/indy_node/roles/indy_node/tasks/configure.yml @@ -183,12 +183,12 @@ - name: Ensure json output file exists file: - path: "{{ playbook_dir }}/indy_node_init_output.json" + path: output/indy_node_init_output.json state: touch - name: Append Init JSON output to file using blockinfile blockinfile: - path: "{{ playbook_dir }}/indy_node_init_output.json" + path: output/indy_node_init_output.json marker: "# {mark} ANSIBLE MANAGED INIT OUTPUT" block: | {% raw %} From c586c389bee62880294e5f9f583b83bea9afa1b6 Mon Sep 17 00:00:00 2001 From: Sylvain Martel Date: Thu, 15 Feb 2024 16:15:40 -0500 Subject: [PATCH 08/71] m --- ansible/indy_node/roles/indy_node/tasks/configure.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ansible/indy_node/roles/indy_node/tasks/configure.yml b/ansible/indy_node/roles/indy_node/tasks/configure.yml index e8e3a5d..e94d3c6 100644 --- a/ansible/indy_node/roles/indy_node/tasks/configure.yml +++ b/ansible/indy_node/roles/indy_node/tasks/configure.yml @@ -183,12 +183,12 @@ - name: Ensure json output file exists file: - path: output/indy_node_init_output.json + path: indy_node_init_output.json state: touch - name: Append Init JSON output to file using blockinfile blockinfile: - path: output/indy_node_init_output.json + path: indy_node_init_output.json marker: "# {mark} ANSIBLE MANAGED INIT OUTPUT" block: | {% raw %} From eae601aa118751ffb403bbd68800dee4d494cc66 Mon Sep 17 00:00:00 2001 From: Sylvain Martel Date: Thu, 15 Feb 2024 16:29:36 -0500 Subject: [PATCH 09/71] m --- ansible/indy_node/roles/indy_node/tasks/configure.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ansible/indy_node/roles/indy_node/tasks/configure.yml b/ansible/indy_node/roles/indy_node/tasks/configure.yml index e94d3c6..faece46 100644 --- a/ansible/indy_node/roles/indy_node/tasks/configure.yml +++ b/ansible/indy_node/roles/indy_node/tasks/configure.yml @@ -183,12 +183,12 @@ - name: Ensure json output file exists file: - path: indy_node_init_output.json + path: /builds/inc/ingrd/terraform-candy-ingrid/indy_node_init_output.json state: touch - name: Append Init JSON output to file using blockinfile blockinfile: - path: indy_node_init_output.json + path: /builds/inc/ingrd/terraform-candy-ingrid/indy_node_init_output.json marker: "# {mark} ANSIBLE MANAGED INIT OUTPUT" block: | {% raw %} From 1a71ace6ad33fc0ae8dbd407d3b9b39017cad797 Mon Sep 17 00:00:00 2001 From: Sylvain Martel Date: Thu, 15 Feb 2024 16:35:24 -0500 Subject: [PATCH 10/71] m --- ansible/indy_node/roles/indy_node/tasks/configure.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ansible/indy_node/roles/indy_node/tasks/configure.yml b/ansible/indy_node/roles/indy_node/tasks/configure.yml index faece46..e94d3c6 100644 --- a/ansible/indy_node/roles/indy_node/tasks/configure.yml +++ b/ansible/indy_node/roles/indy_node/tasks/configure.yml @@ -183,12 +183,12 @@ - name: Ensure json output file exists file: - path: /builds/inc/ingrd/terraform-candy-ingrid/indy_node_init_output.json + path: indy_node_init_output.json state: touch - name: Append Init JSON output to file using blockinfile blockinfile: - path: /builds/inc/ingrd/terraform-candy-ingrid/indy_node_init_output.json + path: indy_node_init_output.json marker: "# {mark} ANSIBLE MANAGED INIT OUTPUT" block: | {% raw %} From eb949b8a7acaad936dc75a622621b6159dfec92a Mon Sep 17 00:00:00 2001 From: Sylvain Martel Date: Thu, 15 Feb 2024 16:43:43 -0500 Subject: [PATCH 11/71] m --- ansible/indy_node/roles/indy_node/tasks/configure.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ansible/indy_node/roles/indy_node/tasks/configure.yml b/ansible/indy_node/roles/indy_node/tasks/configure.yml index e94d3c6..cae8910 100644 --- a/ansible/indy_node/roles/indy_node/tasks/configure.yml +++ b/ansible/indy_node/roles/indy_node/tasks/configure.yml @@ -183,12 +183,12 @@ - name: Ensure json output file exists file: - path: indy_node_init_output.json + path: init_output.json state: touch - name: Append Init JSON output to file using blockinfile blockinfile: - path: indy_node_init_output.json + path: init_output.json marker: "# {mark} ANSIBLE MANAGED INIT OUTPUT" block: | {% raw %} From 45e1c79de9095a06174cf29b2d98bc0733462e44 Mon Sep 17 00:00:00 2001 From: Sylvain Martel Date: Thu, 15 Feb 2024 16:52:41 -0500 Subject: [PATCH 12/71] m --- ansible/indy_node/roles/indy_node/tasks/configure.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ansible/indy_node/roles/indy_node/tasks/configure.yml b/ansible/indy_node/roles/indy_node/tasks/configure.yml index cae8910..a2f498e 100644 --- a/ansible/indy_node/roles/indy_node/tasks/configure.yml +++ b/ansible/indy_node/roles/indy_node/tasks/configure.yml @@ -186,6 +186,11 @@ path: init_output.json state: touch +- name: Find init_output.json + find: + paths: . + patterns: "*.json" + - name: Append Init JSON output to file using blockinfile blockinfile: path: init_output.json From 2061d2af8609f3c8c88562bb4c325178307c7943 Mon Sep 17 00:00:00 2001 From: Sylvain Martel Date: Thu, 15 Feb 2024 16:56:18 -0500 Subject: [PATCH 13/71] m --- ansible/indy_node/roles/indy_node/tasks/configure.yml | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/ansible/indy_node/roles/indy_node/tasks/configure.yml b/ansible/indy_node/roles/indy_node/tasks/configure.yml index a2f498e..79b952a 100644 --- a/ansible/indy_node/roles/indy_node/tasks/configure.yml +++ b/ansible/indy_node/roles/indy_node/tasks/configure.yml @@ -185,11 +185,7 @@ file: path: init_output.json state: touch - -- name: Find init_output.json - find: - paths: . - patterns: "*.json" + delegate_to: localhost - name: Append Init JSON output to file using blockinfile blockinfile: @@ -199,6 +195,7 @@ {% raw %} {{ lookup('template', 'init_output.j2') }} {% endraw %} + delegate_to: localhost - name: Print init_indy_node result debug: From ed5752ba9cff5a3c7237761e5533685186201199 Mon Sep 17 00:00:00 2001 From: Sylvain Martel Date: Thu, 15 Feb 2024 17:06:21 -0500 Subject: [PATCH 14/71] m --- ansible/indy_node/roles/indy_node/tasks/configure.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ansible/indy_node/roles/indy_node/tasks/configure.yml b/ansible/indy_node/roles/indy_node/tasks/configure.yml index 79b952a..83fa861 100644 --- a/ansible/indy_node/roles/indy_node/tasks/configure.yml +++ b/ansible/indy_node/roles/indy_node/tasks/configure.yml @@ -187,6 +187,10 @@ state: touch delegate_to: localhost +- name: DEBUG - Show template content + debug: + msg: "{{ lookup('template', 'init_output.j2') }}" + - name: Append Init JSON output to file using blockinfile blockinfile: path: init_output.json From 12d61bf3d5008e78d78648d2cb49fb65e3958f2e Mon Sep 17 00:00:00 2001 From: Sylvain Martel Date: Thu, 15 Feb 2024 17:31:39 -0500 Subject: [PATCH 15/71] m --- ansible/indy_node/roles/indy_node/tasks/configure.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ansible/indy_node/roles/indy_node/tasks/configure.yml b/ansible/indy_node/roles/indy_node/tasks/configure.yml index 83fa861..08885b2 100644 --- a/ansible/indy_node/roles/indy_node/tasks/configure.yml +++ b/ansible/indy_node/roles/indy_node/tasks/configure.yml @@ -196,9 +196,9 @@ path: init_output.json marker: "# {mark} ANSIBLE MANAGED INIT OUTPUT" block: | - {% raw %} + {{ lookup('template', 'init_output.j2') }} - {% endraw %} + delegate_to: localhost - name: Print init_indy_node result From a6c06b9d4732e46c1ff9c8e3b33db94372bf3e3f Mon Sep 17 00:00:00 2001 From: Sylvain Martel Date: Fri, 16 Feb 2024 07:17:01 -0500 Subject: [PATCH 16/71] m --- .../roles/indy_node/tasks/configure.yml | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/ansible/indy_node/roles/indy_node/tasks/configure.yml b/ansible/indy_node/roles/indy_node/tasks/configure.yml index 08885b2..ed15b0a 100644 --- a/ansible/indy_node/roles/indy_node/tasks/configure.yml +++ b/ansible/indy_node/roles/indy_node/tasks/configure.yml @@ -191,14 +191,20 @@ debug: msg: "{{ lookup('template', 'init_output.j2') }}" -- name: Append Init JSON output to file using blockinfile - blockinfile: - path: init_output.json - marker: "# {mark} ANSIBLE MANAGED INIT OUTPUT" - block: | +# - name: Append Init JSON output to file using blockinfile +# blockinfile: +# path: init_output.json +# marker: "# {mark} ANSIBLE MANAGED INIT OUTPUT" +# block: | + +# {{ lookup('template', 'init_output.j2') }} - {{ lookup('template', 'init_output.j2') }} +# delegate_to: localhost +- name: Render init_output template and write to file + template: + src: init_output.j2 + dest: init_output.json delegate_to: localhost - name: Print init_indy_node result From 9a578a9b140d3266c3ea2b931fdf2e4bd098e31d Mon Sep 17 00:00:00 2001 From: Sylvain Martel Date: Fri, 16 Feb 2024 07:42:21 -0500 Subject: [PATCH 17/71] m --- .../roles/indy_node/tasks/configure.yml | 21 +++++++++---------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/ansible/indy_node/roles/indy_node/tasks/configure.yml b/ansible/indy_node/roles/indy_node/tasks/configure.yml index ed15b0a..ac1c1ce 100644 --- a/ansible/indy_node/roles/indy_node/tasks/configure.yml +++ b/ansible/indy_node/roles/indy_node/tasks/configure.yml @@ -191,22 +191,21 @@ debug: msg: "{{ lookup('template', 'init_output.j2') }}" -# - name: Append Init JSON output to file using blockinfile -# blockinfile: -# path: init_output.json -# marker: "# {mark} ANSIBLE MANAGED INIT OUTPUT" -# block: | - -# {{ lookup('template', 'init_output.j2') }} - -# delegate_to: localhost - - name: Render init_output template and write to file template: src: init_output.j2 - dest: init_output.json + dest: init_output_{{ inventory_hostname }}.json delegate_to: localhost +- name: Append all outputs to init_output.json + blockinfile: + path: init_output.json + #marker: "# {mark} ANSIBLE MANAGED INIT OUTPUT" + block: | + {% for host in ansible_play_hosts %} + {{ lookup('file', '/tmp/init_output_{{ host }}.txt') }} + {% endfor %} + - name: Print init_indy_node result debug: var: init_indy_node_result.stdout_lines From 17b1427eec5875b597d984c5b0914f3233f2e1a9 Mon Sep 17 00:00:00 2001 From: Sylvain Martel Date: Fri, 16 Feb 2024 08:10:15 -0500 Subject: [PATCH 18/71] m --- ansible/indy_node/roles/indy_node/tasks/configure.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ansible/indy_node/roles/indy_node/tasks/configure.yml b/ansible/indy_node/roles/indy_node/tasks/configure.yml index ac1c1ce..913eaac 100644 --- a/ansible/indy_node/roles/indy_node/tasks/configure.yml +++ b/ansible/indy_node/roles/indy_node/tasks/configure.yml @@ -194,7 +194,7 @@ - name: Render init_output template and write to file template: src: init_output.j2 - dest: init_output_{{ inventory_hostname }}.json + dest: /tmp/init_output_{{ inventory_hostname }}.json delegate_to: localhost - name: Append all outputs to init_output.json From 41990bfa4b72fd443bf47157644b3cb4f72ecbf5 Mon Sep 17 00:00:00 2001 From: Sylvain Martel Date: Fri, 16 Feb 2024 08:39:09 -0500 Subject: [PATCH 19/71] m --- .../indy_node/roles/indy_node/tasks/configure.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/ansible/indy_node/roles/indy_node/tasks/configure.yml b/ansible/indy_node/roles/indy_node/tasks/configure.yml index 913eaac..3d9c2fc 100644 --- a/ansible/indy_node/roles/indy_node/tasks/configure.yml +++ b/ansible/indy_node/roles/indy_node/tasks/configure.yml @@ -191,11 +191,11 @@ debug: msg: "{{ lookup('template', 'init_output.j2') }}" -- name: Render init_output template and write to file - template: - src: init_output.j2 - dest: /tmp/init_output_{{ inventory_hostname }}.json - delegate_to: localhost +# - name: Render init_output template and write to file +# template: +# src: init_output.j2 +# dest: /tmp/init_output_{{ inventory_hostname }}.json +# delegate_to: localhost - name: Append all outputs to init_output.json blockinfile: @@ -203,7 +203,7 @@ #marker: "# {mark} ANSIBLE MANAGED INIT OUTPUT" block: | {% for host in ansible_play_hosts %} - {{ lookup('file', '/tmp/init_output_{{ host }}.txt') }} + {{ lookup('file', '/tmp/init_output_{{ host }}.json') }} {% endfor %} - name: Print init_indy_node result From 44e9ce271a53659cd85d9fc80bb039e5e63379c5 Mon Sep 17 00:00:00 2001 From: Sylvain Martel Date: Fri, 16 Feb 2024 08:44:20 -0500 Subject: [PATCH 20/71] m --- ansible/indy_node/roles/indy_node/tasks/configure.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/ansible/indy_node/roles/indy_node/tasks/configure.yml b/ansible/indy_node/roles/indy_node/tasks/configure.yml index 3d9c2fc..2219568 100644 --- a/ansible/indy_node/roles/indy_node/tasks/configure.yml +++ b/ansible/indy_node/roles/indy_node/tasks/configure.yml @@ -205,6 +205,7 @@ {% for host in ansible_play_hosts %} {{ lookup('file', '/tmp/init_output_{{ host }}.json') }} {% endfor %} + delegate_to: localhost - name: Print init_indy_node result debug: From 34c1516f9a00717ac2018021257ab0324a526cb3 Mon Sep 17 00:00:00 2001 From: Sylvain Martel Date: Fri, 16 Feb 2024 08:47:48 -0500 Subject: [PATCH 21/71] m --- .../indy_node/roles/indy_node/tasks/configure.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/ansible/indy_node/roles/indy_node/tasks/configure.yml b/ansible/indy_node/roles/indy_node/tasks/configure.yml index 2219568..56e1257 100644 --- a/ansible/indy_node/roles/indy_node/tasks/configure.yml +++ b/ansible/indy_node/roles/indy_node/tasks/configure.yml @@ -191,11 +191,11 @@ debug: msg: "{{ lookup('template', 'init_output.j2') }}" -# - name: Render init_output template and write to file -# template: -# src: init_output.j2 -# dest: /tmp/init_output_{{ inventory_hostname }}.json -# delegate_to: localhost +- name: Render init_output template and write to file + template: + src: init_output.j2 + dest: init_output_{{ inventory_hostname }}.json + delegate_to: localhost - name: Append all outputs to init_output.json blockinfile: @@ -203,7 +203,7 @@ #marker: "# {mark} ANSIBLE MANAGED INIT OUTPUT" block: | {% for host in ansible_play_hosts %} - {{ lookup('file', '/tmp/init_output_{{ host }}.json') }} + {{ lookup('file', 'init_output_{{ host }}.json') }} {% endfor %} delegate_to: localhost From e54f6db999377e4cf5d5c4ecfeccb08ffdc5dc79 Mon Sep 17 00:00:00 2001 From: Sylvain Martel Date: Fri, 16 Feb 2024 09:07:49 -0500 Subject: [PATCH 22/71] m --- .../indy_node/roles/indy_node/tasks/configure.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/ansible/indy_node/roles/indy_node/tasks/configure.yml b/ansible/indy_node/roles/indy_node/tasks/configure.yml index 56e1257..033cb4c 100644 --- a/ansible/indy_node/roles/indy_node/tasks/configure.yml +++ b/ansible/indy_node/roles/indy_node/tasks/configure.yml @@ -191,11 +191,11 @@ debug: msg: "{{ lookup('template', 'init_output.j2') }}" -- name: Render init_output template and write to file - template: - src: init_output.j2 - dest: init_output_{{ inventory_hostname }}.json - delegate_to: localhost +# - name: Render init_output template and write to file +# template: +# src: init_output.j2 +# dest: init_output_{{ inventory_hostname }}.json +# delegate_to: localhost - name: Append all outputs to init_output.json blockinfile: @@ -203,7 +203,7 @@ #marker: "# {mark} ANSIBLE MANAGED INIT OUTPUT" block: | {% for host in ansible_play_hosts %} - {{ lookup('file', 'init_output_{{ host }}.json') }} + {{ lookup('file', 'init_output_{{ inventory_hostname }}.json') }} {% endfor %} delegate_to: localhost From 77efeef07d6efd62a3f2124687f1d1ba8df6affe Mon Sep 17 00:00:00 2001 From: Sylvain Martel Date: Fri, 16 Feb 2024 09:11:26 -0500 Subject: [PATCH 23/71] m --- .../indy_node/roles/indy_node/tasks/configure.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/ansible/indy_node/roles/indy_node/tasks/configure.yml b/ansible/indy_node/roles/indy_node/tasks/configure.yml index 033cb4c..a64c695 100644 --- a/ansible/indy_node/roles/indy_node/tasks/configure.yml +++ b/ansible/indy_node/roles/indy_node/tasks/configure.yml @@ -191,11 +191,11 @@ debug: msg: "{{ lookup('template', 'init_output.j2') }}" -# - name: Render init_output template and write to file -# template: -# src: init_output.j2 -# dest: init_output_{{ inventory_hostname }}.json -# delegate_to: localhost +- name: Render init_output template and write to file + template: + src: init_output.j2 + dest: /tmp/init_output_{{ inventory_hostname }}.json + delegate_to: localhost - name: Append all outputs to init_output.json blockinfile: @@ -203,7 +203,7 @@ #marker: "# {mark} ANSIBLE MANAGED INIT OUTPUT" block: | {% for host in ansible_play_hosts %} - {{ lookup('file', 'init_output_{{ inventory_hostname }}.json') }} + {{ lookup('file', '/tmp/init_output_{{ inventory_hostname }}.json') }} {% endfor %} delegate_to: localhost From 1e102d89100a80fe1a370e1535547570e84cc5f3 Mon Sep 17 00:00:00 2001 From: Sylvain Martel Date: Fri, 16 Feb 2024 09:14:16 -0500 Subject: [PATCH 24/71] m --- ansible/indy_node/roles/indy_node/tasks/configure.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ansible/indy_node/roles/indy_node/tasks/configure.yml b/ansible/indy_node/roles/indy_node/tasks/configure.yml index a64c695..03607e6 100644 --- a/ansible/indy_node/roles/indy_node/tasks/configure.yml +++ b/ansible/indy_node/roles/indy_node/tasks/configure.yml @@ -200,7 +200,7 @@ - name: Append all outputs to init_output.json blockinfile: path: init_output.json - #marker: "# {mark} ANSIBLE MANAGED INIT OUTPUT" + marker: "# {mark} ANSIBLE MANAGED INIT OUTPUT" block: | {% for host in ansible_play_hosts %} {{ lookup('file', '/tmp/init_output_{{ inventory_hostname }}.json') }} From adabee7bf34fbf182f4dd31fcaa6ba7ca29d3a85 Mon Sep 17 00:00:00 2001 From: Sylvain Martel Date: Mon, 19 Feb 2024 13:33:10 -0500 Subject: [PATCH 25/71] m --- .../indy_node/roles/indy_node/tasks/configure.yml | 15 ++++++++------- .../roles/indy_node/templates/init_output.j2 | 3 +++ 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/ansible/indy_node/roles/indy_node/tasks/configure.yml b/ansible/indy_node/roles/indy_node/tasks/configure.yml index 03607e6..08948b2 100644 --- a/ansible/indy_node/roles/indy_node/tasks/configure.yml +++ b/ansible/indy_node/roles/indy_node/tasks/configure.yml @@ -181,11 +181,11 @@ debug: msg: "ENSUE YOU RECORD THE FOLLOWING INITIALIZATION OUTPUT IN A SAFE LOCATION!" -- name: Ensure json output file exists - file: - path: init_output.json - state: touch - delegate_to: localhost +# - name: Ensure json output file exists +# file: +# path: init_output.json +# state: touch +# delegate_to: localhost - name: DEBUG - Show template content debug: @@ -201,10 +201,11 @@ blockinfile: path: init_output.json marker: "# {mark} ANSIBLE MANAGED INIT OUTPUT" + create: yes # Ensure file exists before the first run block: | - {% for host in ansible_play_hosts %} + {% if lookup('file', '/tmp/init_output_{{ inventory_hostname }}.json') != "" %} {{ lookup('file', '/tmp/init_output_{{ inventory_hostname }}.json') }} - {% endfor %} + {% endif %} delegate_to: localhost - name: Print init_indy_node result diff --git a/ansible/indy_node/roles/indy_node/templates/init_output.j2 b/ansible/indy_node/roles/indy_node/templates/init_output.j2 index cdde61a..5e899a9 100644 --- a/ansible/indy_node/roles/indy_node/templates/init_output.j2 +++ b/ansible/indy_node/roles/indy_node/templates/init_output.j2 @@ -1,3 +1,6 @@ { + "hostname": {{ hostname }} "initialization_output": {{ init_indy_node_result.stdout_lines }} + "node_ip": {{ hostvars[inventory_hostname]['node_ip'] }} + "client_ip" {{ hostvars[inventory_hostname]['client_ip'] }} } \ No newline at end of file From 74e33ba7967057ef8b4c7077fa3e336bb17b0310 Mon Sep 17 00:00:00 2001 From: Sylvain Martel Date: Mon, 19 Feb 2024 13:43:47 -0500 Subject: [PATCH 26/71] m --- ansible/indy_node/roles/indy_node/tasks/configure.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/ansible/indy_node/roles/indy_node/tasks/configure.yml b/ansible/indy_node/roles/indy_node/tasks/configure.yml index 08948b2..9220ada 100644 --- a/ansible/indy_node/roles/indy_node/tasks/configure.yml +++ b/ansible/indy_node/roles/indy_node/tasks/configure.yml @@ -201,7 +201,6 @@ blockinfile: path: init_output.json marker: "# {mark} ANSIBLE MANAGED INIT OUTPUT" - create: yes # Ensure file exists before the first run block: | {% if lookup('file', '/tmp/init_output_{{ inventory_hostname }}.json') != "" %} {{ lookup('file', '/tmp/init_output_{{ inventory_hostname }}.json') }} From 4d87da8cbd127925d34d84ad6b8ffac9d7d01929 Mon Sep 17 00:00:00 2001 From: Sylvain Martel Date: Mon, 19 Feb 2024 13:48:26 -0500 Subject: [PATCH 27/71] m --- ansible/indy_node/roles/indy_node/tasks/configure.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/ansible/indy_node/roles/indy_node/tasks/configure.yml b/ansible/indy_node/roles/indy_node/tasks/configure.yml index 9220ada..47dd07f 100644 --- a/ansible/indy_node/roles/indy_node/tasks/configure.yml +++ b/ansible/indy_node/roles/indy_node/tasks/configure.yml @@ -181,11 +181,11 @@ debug: msg: "ENSUE YOU RECORD THE FOLLOWING INITIALIZATION OUTPUT IN A SAFE LOCATION!" -# - name: Ensure json output file exists -# file: -# path: init_output.json -# state: touch -# delegate_to: localhost +- name: Ensure json output file exists + file: + path: init_output.json + state: touch + delegate_to: localhost - name: DEBUG - Show template content debug: From d1dc88a4ea1d7ff1867d299caaabbb9dc213ef8a Mon Sep 17 00:00:00 2001 From: Sylvain Martel Date: Mon, 19 Feb 2024 14:04:26 -0500 Subject: [PATCH 28/71] m --- ansible/indy_node/roles/indy_node/tasks/configure.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ansible/indy_node/roles/indy_node/tasks/configure.yml b/ansible/indy_node/roles/indy_node/tasks/configure.yml index 47dd07f..29a6f9b 100644 --- a/ansible/indy_node/roles/indy_node/tasks/configure.yml +++ b/ansible/indy_node/roles/indy_node/tasks/configure.yml @@ -202,9 +202,9 @@ path: init_output.json marker: "# {mark} ANSIBLE MANAGED INIT OUTPUT" block: | - {% if lookup('file', '/tmp/init_output_{{ inventory_hostname }}.json') != "" %} {{ lookup('file', '/tmp/init_output_{{ inventory_hostname }}.json') }} - {% endif %} + create: true + state: present delegate_to: localhost - name: Print init_indy_node result From 396f29ee619f70685f1dd0d02596c1318cc4741b Mon Sep 17 00:00:00 2001 From: Sylvain Martel Date: Mon, 19 Feb 2024 14:18:36 -0500 Subject: [PATCH 29/71] m --- .../roles/indy_node/tasks/configure.yml | 32 ++++++++++++++----- 1 file changed, 24 insertions(+), 8 deletions(-) diff --git a/ansible/indy_node/roles/indy_node/tasks/configure.yml b/ansible/indy_node/roles/indy_node/tasks/configure.yml index 29a6f9b..d218403 100644 --- a/ansible/indy_node/roles/indy_node/tasks/configure.yml +++ b/ansible/indy_node/roles/indy_node/tasks/configure.yml @@ -197,16 +197,32 @@ dest: /tmp/init_output_{{ inventory_hostname }}.json delegate_to: localhost -- name: Append all outputs to init_output.json - blockinfile: - path: init_output.json - marker: "# {mark} ANSIBLE MANAGED INIT OUTPUT" - block: | - {{ lookup('file', '/tmp/init_output_{{ inventory_hostname }}.json') }} - create: true - state: present +- name: Fetch temporary output files + fetch: + src: /tmp/init_output_{{ inventory_hostname }}.json + dest: /tmp/ # Temporary location on controller delegate_to: localhost +- name: Assemble combined output JSON + set_fact: + combined_outputs: "{{ combined_outputs | default([]) + ansible_facts['fetched'] [item]['file'] }}" + loop: "{{ groups['all'] }}" # Assuming you want output across all hosts + +- name: Create init_output.json with combined data + copy: + content: "{{ combined_outputs | to_nice_json(indent=2) }}" + dest: init_output.json # Choose the desired path + +# - name: Append all outputs to init_output.json +# blockinfile: +# path: init_output.json +# marker: "# {mark} ANSIBLE MANAGED INIT OUTPUT" +# block: | +# {{ lookup('file', '/tmp/init_output_{{ inventory_hostname }}.json') }} +# create: true +# state: present +# delegate_to: localhost + - name: Print init_indy_node result debug: var: init_indy_node_result.stdout_lines From ca812149b770adf2113cd158bb6e6ba9d5a6cd1e Mon Sep 17 00:00:00 2001 From: Sylvain Martel Date: Mon, 19 Feb 2024 14:26:52 -0500 Subject: [PATCH 30/71] m --- .../roles/indy_node/tasks/configure.yml | 25 ++++++++----------- .../indy_node/templates/combine_outputs.j2 | 12 +++++++++ 2 files changed, 23 insertions(+), 14 deletions(-) create mode 100644 ansible/indy_node/roles/indy_node/templates/combine_outputs.j2 diff --git a/ansible/indy_node/roles/indy_node/tasks/configure.yml b/ansible/indy_node/roles/indy_node/tasks/configure.yml index d218403..ba83c79 100644 --- a/ansible/indy_node/roles/indy_node/tasks/configure.yml +++ b/ansible/indy_node/roles/indy_node/tasks/configure.yml @@ -197,21 +197,18 @@ dest: /tmp/init_output_{{ inventory_hostname }}.json delegate_to: localhost -- name: Fetch temporary output files - fetch: - src: /tmp/init_output_{{ inventory_hostname }}.json - dest: /tmp/ # Temporary location on controller - delegate_to: localhost - -- name: Assemble combined output JSON - set_fact: - combined_outputs: "{{ combined_outputs | default([]) + ansible_facts['fetched'] [item]['file'] }}" - loop: "{{ groups['all'] }}" # Assuming you want output across all hosts +- name: Get list of JSON files to combine + find: + paths: /tmp/ + patterns: "init_output_*.json" + register: json_file_results -- name: Create init_output.json with combined data - copy: - content: "{{ combined_outputs | to_nice_json(indent=2) }}" - dest: init_output.json # Choose the desired path +- name: Create combined JSON using Jinja2 template + template: + src: combine_json.j2 + dest: init_output.json + vars: + file_list: "{{ json_file_results.files | map(attribute='path') | list }}" # - name: Append all outputs to init_output.json # blockinfile: diff --git a/ansible/indy_node/roles/indy_node/templates/combine_outputs.j2 b/ansible/indy_node/roles/indy_node/templates/combine_outputs.j2 new file mode 100644 index 0000000..c8b0361 --- /dev/null +++ b/ansible/indy_node/roles/indy_node/templates/combine_outputs.j2 @@ -0,0 +1,12 @@ +{# We'll get a list of filenames from Ansible #} +{% set json_files = file_list %} + +{% set combined_data = [] %} +{% for file in json_files %} + {% with open(file) as f %} + {% set file_data = f.read() | from_json %} + {% do combined_data.append(file_data) %} + {% endwith %} +{% endfor %} + +{{ combined_data | to_nice_json(indent=2) }} \ No newline at end of file From 4cd753ec46e3a661aa251830f1e08b68c13ede2c Mon Sep 17 00:00:00 2001 From: Sylvain Martel Date: Mon, 19 Feb 2024 14:29:40 -0500 Subject: [PATCH 31/71] m --- ansible/indy_node/roles/indy_node/tasks/configure.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ansible/indy_node/roles/indy_node/tasks/configure.yml b/ansible/indy_node/roles/indy_node/tasks/configure.yml index ba83c79..a3787ce 100644 --- a/ansible/indy_node/roles/indy_node/tasks/configure.yml +++ b/ansible/indy_node/roles/indy_node/tasks/configure.yml @@ -205,7 +205,7 @@ - name: Create combined JSON using Jinja2 template template: - src: combine_json.j2 + src: combine_outputs.j2 dest: init_output.json vars: file_list: "{{ json_file_results.files | map(attribute='path') | list }}" From 26c1fe33333e250e51623acb806b2e6aa678df22 Mon Sep 17 00:00:00 2001 From: Sylvain Martel Date: Mon, 19 Feb 2024 14:32:12 -0500 Subject: [PATCH 32/71] m --- ansible/indy_node/roles/indy_node/tasks/configure.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ansible/indy_node/roles/indy_node/tasks/configure.yml b/ansible/indy_node/roles/indy_node/tasks/configure.yml index a3787ce..b99f065 100644 --- a/ansible/indy_node/roles/indy_node/tasks/configure.yml +++ b/ansible/indy_node/roles/indy_node/tasks/configure.yml @@ -199,7 +199,7 @@ - name: Get list of JSON files to combine find: - paths: /tmp/ + paths: /tmp patterns: "init_output_*.json" register: json_file_results From 1f4bfa40655066574d688482beeb92a056b67779 Mon Sep 17 00:00:00 2001 From: Sylvain Martel Date: Mon, 19 Feb 2024 14:46:48 -0500 Subject: [PATCH 33/71] m --- ansible/indy_node/roles/indy_node/tasks/configure.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ansible/indy_node/roles/indy_node/tasks/configure.yml b/ansible/indy_node/roles/indy_node/tasks/configure.yml index b99f065..46aee34 100644 --- a/ansible/indy_node/roles/indy_node/tasks/configure.yml +++ b/ansible/indy_node/roles/indy_node/tasks/configure.yml @@ -203,9 +203,9 @@ patterns: "init_output_*.json" register: json_file_results -- name: Create combined JSON using Jinja2 template - template: - src: combine_outputs.j2 +- name: Create combined JSON + assemble: + src: /tmp/*.json dest: init_output.json vars: file_list: "{{ json_file_results.files | map(attribute='path') | list }}" From 2e5879a3356f66269c20c7f6e7dfdcd4a77be48a Mon Sep 17 00:00:00 2001 From: Sylvain Martel Date: Mon, 19 Feb 2024 14:49:05 -0500 Subject: [PATCH 34/71] m --- ansible/indy_node/roles/indy_node/tasks/configure.yml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/ansible/indy_node/roles/indy_node/tasks/configure.yml b/ansible/indy_node/roles/indy_node/tasks/configure.yml index 46aee34..f9696ff 100644 --- a/ansible/indy_node/roles/indy_node/tasks/configure.yml +++ b/ansible/indy_node/roles/indy_node/tasks/configure.yml @@ -199,16 +199,18 @@ - name: Get list of JSON files to combine find: - paths: /tmp + paths: /tmp/ patterns: "init_output_*.json" register: json_file_results + delegate_to: localhost -- name: Create combined JSON - assemble: - src: /tmp/*.json +- name: Create combined JSON using Jinja2 template + template: + src: combine_outputs.j2 dest: init_output.json vars: file_list: "{{ json_file_results.files | map(attribute='path') | list }}" + delegate_to: localhost # - name: Append all outputs to init_output.json # blockinfile: From 87f7910afadcb72a469047d3666a6cebf1cedf73 Mon Sep 17 00:00:00 2001 From: Sylvain Martel Date: Mon, 19 Feb 2024 14:57:34 -0500 Subject: [PATCH 35/71] m --- ansible/indy_node/roles/indy_node/templates/combine_outputs.j2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ansible/indy_node/roles/indy_node/templates/combine_outputs.j2 b/ansible/indy_node/roles/indy_node/templates/combine_outputs.j2 index c8b0361..d7b46f4 100644 --- a/ansible/indy_node/roles/indy_node/templates/combine_outputs.j2 +++ b/ansible/indy_node/roles/indy_node/templates/combine_outputs.j2 @@ -9,4 +9,4 @@ {% endwith %} {% endfor %} -{{ combined_data | to_nice_json(indent=2) }} \ No newline at end of file +{{ combined_data }} \ No newline at end of file From 201e084f585f2641f2174576a89dbee5328449d7 Mon Sep 17 00:00:00 2001 From: Sylvain Martel Date: Mon, 19 Feb 2024 15:02:02 -0500 Subject: [PATCH 36/71] m --- ansible/indy_node/roles/indy_node/templates/combine_outputs.j2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ansible/indy_node/roles/indy_node/templates/combine_outputs.j2 b/ansible/indy_node/roles/indy_node/templates/combine_outputs.j2 index d7b46f4..8a8058f 100644 --- a/ansible/indy_node/roles/indy_node/templates/combine_outputs.j2 +++ b/ansible/indy_node/roles/indy_node/templates/combine_outputs.j2 @@ -4,7 +4,7 @@ {% set combined_data = [] %} {% for file in json_files %} {% with open(file) as f %} - {% set file_data = f.read() | from_json %} + {% set file_data = f.read() %} {% do combined_data.append(file_data) %} {% endwith %} {% endfor %} From d9d21d63eae5297aa8fd5cbe1c55bb2f94462383 Mon Sep 17 00:00:00 2001 From: Sylvain Martel Date: Mon, 19 Feb 2024 15:06:25 -0500 Subject: [PATCH 37/71] m --- ansible/indy_node/roles/indy_node/tasks/configure.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ansible/indy_node/roles/indy_node/tasks/configure.yml b/ansible/indy_node/roles/indy_node/tasks/configure.yml index f9696ff..af1c5aa 100644 --- a/ansible/indy_node/roles/indy_node/tasks/configure.yml +++ b/ansible/indy_node/roles/indy_node/tasks/configure.yml @@ -199,7 +199,7 @@ - name: Get list of JSON files to combine find: - paths: /tmp/ + paths: /tmp patterns: "init_output_*.json" register: json_file_results delegate_to: localhost From a7a31e5330d8c10f3aa9df35968a0601de5824d4 Mon Sep 17 00:00:00 2001 From: Sylvain Martel Date: Mon, 19 Feb 2024 15:14:54 -0500 Subject: [PATCH 38/71] m --- .../roles/indy_node/tasks/configure.yml | 16 +++------------- .../roles/indy_node/templates/combine_outputs.j2 | 12 ------------ 2 files changed, 3 insertions(+), 25 deletions(-) delete mode 100644 ansible/indy_node/roles/indy_node/templates/combine_outputs.j2 diff --git a/ansible/indy_node/roles/indy_node/tasks/configure.yml b/ansible/indy_node/roles/indy_node/tasks/configure.yml index af1c5aa..eb79771 100644 --- a/ansible/indy_node/roles/indy_node/tasks/configure.yml +++ b/ansible/indy_node/roles/indy_node/tasks/configure.yml @@ -197,20 +197,10 @@ dest: /tmp/init_output_{{ inventory_hostname }}.json delegate_to: localhost -- name: Get list of JSON files to combine - find: - paths: /tmp - patterns: "init_output_*.json" - register: json_file_results - delegate_to: localhost - -- name: Create combined JSON using Jinja2 template - template: - src: combine_outputs.j2 +- name: Assemble JSON files into one + assemble: + src: /tmp/ dest: init_output.json - vars: - file_list: "{{ json_file_results.files | map(attribute='path') | list }}" - delegate_to: localhost # - name: Append all outputs to init_output.json # blockinfile: diff --git a/ansible/indy_node/roles/indy_node/templates/combine_outputs.j2 b/ansible/indy_node/roles/indy_node/templates/combine_outputs.j2 deleted file mode 100644 index 8a8058f..0000000 --- a/ansible/indy_node/roles/indy_node/templates/combine_outputs.j2 +++ /dev/null @@ -1,12 +0,0 @@ -{# We'll get a list of filenames from Ansible #} -{% set json_files = file_list %} - -{% set combined_data = [] %} -{% for file in json_files %} - {% with open(file) as f %} - {% set file_data = f.read() %} - {% do combined_data.append(file_data) %} - {% endwith %} -{% endfor %} - -{{ combined_data }} \ No newline at end of file From 9cfdc8f61176a29600d77bd00a376dd63e8275d3 Mon Sep 17 00:00:00 2001 From: Sylvain Martel Date: Mon, 19 Feb 2024 15:17:12 -0500 Subject: [PATCH 39/71] m --- ansible/indy_node/roles/indy_node/tasks/configure.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/ansible/indy_node/roles/indy_node/tasks/configure.yml b/ansible/indy_node/roles/indy_node/tasks/configure.yml index eb79771..0c25070 100644 --- a/ansible/indy_node/roles/indy_node/tasks/configure.yml +++ b/ansible/indy_node/roles/indy_node/tasks/configure.yml @@ -201,6 +201,7 @@ assemble: src: /tmp/ dest: init_output.json + delegate_to: localhost # - name: Append all outputs to init_output.json # blockinfile: From c4bcc64b8ab46f971aea3fce66ccbfb0079706a8 Mon Sep 17 00:00:00 2001 From: Sylvain Martel Date: Mon, 19 Feb 2024 15:22:13 -0500 Subject: [PATCH 40/71] m --- ansible/indy_node/roles/indy_node/tasks/configure.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ansible/indy_node/roles/indy_node/tasks/configure.yml b/ansible/indy_node/roles/indy_node/tasks/configure.yml index 0c25070..708c7e3 100644 --- a/ansible/indy_node/roles/indy_node/tasks/configure.yml +++ b/ansible/indy_node/roles/indy_node/tasks/configure.yml @@ -194,7 +194,7 @@ - name: Render init_output template and write to file template: src: init_output.j2 - dest: /tmp/init_output_{{ inventory_hostname }}.json + dest: /tmp/candy/init_output_{{ inventory_hostname }}.json delegate_to: localhost - name: Assemble JSON files into one From d1b3806efb1bd3b4fb22ad8c9551a935c5f9e517 Mon Sep 17 00:00:00 2001 From: Sylvain Martel Date: Mon, 19 Feb 2024 15:29:20 -0500 Subject: [PATCH 41/71] m --- ansible/indy_node/roles/indy_node/tasks/configure.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ansible/indy_node/roles/indy_node/tasks/configure.yml b/ansible/indy_node/roles/indy_node/tasks/configure.yml index 708c7e3..9caa6a3 100644 --- a/ansible/indy_node/roles/indy_node/tasks/configure.yml +++ b/ansible/indy_node/roles/indy_node/tasks/configure.yml @@ -191,6 +191,11 @@ debug: msg: "{{ lookup('template', 'init_output.j2') }}" +- name: ensures /tmp/candy dir exists + file: + path: "/tmp/candy" + state: directory + - name: Render init_output template and write to file template: src: init_output.j2 From 7aa0eba47963e4ae4c4c489e46337ce0de6541b7 Mon Sep 17 00:00:00 2001 From: Sylvain Martel Date: Mon, 19 Feb 2024 15:30:24 -0500 Subject: [PATCH 42/71] m --- ansible/indy_node/roles/indy_node/tasks/configure.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ansible/indy_node/roles/indy_node/tasks/configure.yml b/ansible/indy_node/roles/indy_node/tasks/configure.yml index 9caa6a3..e6b6517 100644 --- a/ansible/indy_node/roles/indy_node/tasks/configure.yml +++ b/ansible/indy_node/roles/indy_node/tasks/configure.yml @@ -204,7 +204,7 @@ - name: Assemble JSON files into one assemble: - src: /tmp/ + src: /tmp/candy dest: init_output.json delegate_to: localhost From 67f0b5aba0dad77813abc94b7400e530f47e390a Mon Sep 17 00:00:00 2001 From: Sylvain Martel Date: Mon, 19 Feb 2024 15:33:45 -0500 Subject: [PATCH 43/71] m --- ansible/indy_node/roles/indy_node/tasks/configure.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/ansible/indy_node/roles/indy_node/tasks/configure.yml b/ansible/indy_node/roles/indy_node/tasks/configure.yml index e6b6517..9985a4e 100644 --- a/ansible/indy_node/roles/indy_node/tasks/configure.yml +++ b/ansible/indy_node/roles/indy_node/tasks/configure.yml @@ -195,6 +195,7 @@ file: path: "/tmp/candy" state: directory + delegate_to: localhost - name: Render init_output template and write to file template: From a0e030cfd7da0590078e428c41e143fd91690eec Mon Sep 17 00:00:00 2001 From: Sylvain Martel Date: Mon, 19 Feb 2024 22:05:15 -0500 Subject: [PATCH 44/71] m --- ansible/indy_node/roles/indy_node/templates/init_output.j2 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ansible/indy_node/roles/indy_node/templates/init_output.j2 b/ansible/indy_node/roles/indy_node/templates/init_output.j2 index 5e899a9..3c479e2 100644 --- a/ansible/indy_node/roles/indy_node/templates/init_output.j2 +++ b/ansible/indy_node/roles/indy_node/templates/init_output.j2 @@ -1,6 +1,6 @@ { "hostname": {{ hostname }} "initialization_output": {{ init_indy_node_result.stdout_lines }} - "node_ip": {{ hostvars[inventory_hostname]['node_ip'] }} - "client_ip" {{ hostvars[inventory_hostname]['client_ip'] }} + "node_ip": {{ hostvars[hostname]['node_ip'] }} + "client_ip" {{ hostvars[hostname]['client_ip'] }} } \ No newline at end of file From b07958315905a0ebae26903e03883b307586c8c7 Mon Sep 17 00:00:00 2001 From: Sylvain Martel Date: Mon, 19 Feb 2024 22:14:17 -0500 Subject: [PATCH 45/71] m --- ansible/indy_node/roles/indy_node/templates/init_output.j2 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ansible/indy_node/roles/indy_node/templates/init_output.j2 b/ansible/indy_node/roles/indy_node/templates/init_output.j2 index 3c479e2..5e899a9 100644 --- a/ansible/indy_node/roles/indy_node/templates/init_output.j2 +++ b/ansible/indy_node/roles/indy_node/templates/init_output.j2 @@ -1,6 +1,6 @@ { "hostname": {{ hostname }} "initialization_output": {{ init_indy_node_result.stdout_lines }} - "node_ip": {{ hostvars[hostname]['node_ip'] }} - "client_ip" {{ hostvars[hostname]['client_ip'] }} + "node_ip": {{ hostvars[inventory_hostname]['node_ip'] }} + "client_ip" {{ hostvars[inventory_hostname]['client_ip'] }} } \ No newline at end of file From eb6ec873cbb0b88506aa0736dd5c548f5dff196e Mon Sep 17 00:00:00 2001 From: Sylvain Martel Date: Mon, 19 Feb 2024 22:20:52 -0500 Subject: [PATCH 46/71] m --- ansible/indy_node/roles/indy_node/templates/init_output.j2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ansible/indy_node/roles/indy_node/templates/init_output.j2 b/ansible/indy_node/roles/indy_node/templates/init_output.j2 index 5e899a9..8c2c3dc 100644 --- a/ansible/indy_node/roles/indy_node/templates/init_output.j2 +++ b/ansible/indy_node/roles/indy_node/templates/init_output.j2 @@ -1,5 +1,5 @@ { - "hostname": {{ hostname }} + "hostname": {{ inventory_hostname }} "initialization_output": {{ init_indy_node_result.stdout_lines }} "node_ip": {{ hostvars[inventory_hostname]['node_ip'] }} "client_ip" {{ hostvars[inventory_hostname]['client_ip'] }} From a334fc0c37185e0b21e17f08e1460004fd2a75e0 Mon Sep 17 00:00:00 2001 From: Sylvain Martel Date: Mon, 19 Feb 2024 22:24:58 -0500 Subject: [PATCH 47/71] m --- ansible/indy_node/roles/indy_node/templates/init_output.j2 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ansible/indy_node/roles/indy_node/templates/init_output.j2 b/ansible/indy_node/roles/indy_node/templates/init_output.j2 index 8c2c3dc..02724ec 100644 --- a/ansible/indy_node/roles/indy_node/templates/init_output.j2 +++ b/ansible/indy_node/roles/indy_node/templates/init_output.j2 @@ -1,6 +1,6 @@ { "hostname": {{ inventory_hostname }} "initialization_output": {{ init_indy_node_result.stdout_lines }} - "node_ip": {{ hostvars[inventory_hostname]['node_ip'] }} - "client_ip" {{ hostvars[inventory_hostname]['client_ip'] }} + "node_ip": {{ hostvars[inventory_hostname].node_ip }} + "client_ip" {{ hostvars[inventory_hostname].client_ip }} } \ No newline at end of file From 3fdff2325fc46e40715aa2158f59b240b83fb641 Mon Sep 17 00:00:00 2001 From: Sylvain Martel Date: Mon, 19 Feb 2024 22:28:00 -0500 Subject: [PATCH 48/71] m --- ansible/indy_node/roles/indy_node/templates/init_output.j2 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ansible/indy_node/roles/indy_node/templates/init_output.j2 b/ansible/indy_node/roles/indy_node/templates/init_output.j2 index 02724ec..625b1b1 100644 --- a/ansible/indy_node/roles/indy_node/templates/init_output.j2 +++ b/ansible/indy_node/roles/indy_node/templates/init_output.j2 @@ -1,6 +1,6 @@ { "hostname": {{ inventory_hostname }} "initialization_output": {{ init_indy_node_result.stdout_lines }} - "node_ip": {{ hostvars[inventory_hostname].node_ip }} - "client_ip" {{ hostvars[inventory_hostname].client_ip }} + "node_ip": {{ inventory_hostname.node_ip }} + "client_ip" {{ inventory_hostname.client_ip }} } \ No newline at end of file From d45233948ada5a6cb971b3984144547a0fc4c9b2 Mon Sep 17 00:00:00 2001 From: Sylvain Martel Date: Mon, 19 Feb 2024 22:34:01 -0500 Subject: [PATCH 49/71] m --- ansible/indy_node/roles/indy_node/templates/init_output.j2 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ansible/indy_node/roles/indy_node/templates/init_output.j2 b/ansible/indy_node/roles/indy_node/templates/init_output.j2 index 625b1b1..ec14e24 100644 --- a/ansible/indy_node/roles/indy_node/templates/init_output.j2 +++ b/ansible/indy_node/roles/indy_node/templates/init_output.j2 @@ -1,6 +1,6 @@ { "hostname": {{ inventory_hostname }} "initialization_output": {{ init_indy_node_result.stdout_lines }} - "node_ip": {{ inventory_hostname.node_ip }} - "client_ip" {{ inventory_hostname.client_ip }} + "node_ip": {{ hostvars[inventory_hostname]['tf_node_ip'] }} + "client_ip" {{ hostvars[inventory_hostname]['tf_client_ip'] }} } \ No newline at end of file From a9b05c86cfa80305052e7e5852a66b3f789a9d43 Mon Sep 17 00:00:00 2001 From: Sylvain Martel Date: Tue, 20 Feb 2024 08:57:12 -0500 Subject: [PATCH 50/71] m --- .../indy_node/roles/indy_node/templates/init_output.j2 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ansible/indy_node/roles/indy_node/templates/init_output.j2 b/ansible/indy_node/roles/indy_node/templates/init_output.j2 index ec14e24..5d8b5d8 100644 --- a/ansible/indy_node/roles/indy_node/templates/init_output.j2 +++ b/ansible/indy_node/roles/indy_node/templates/init_output.j2 @@ -1,6 +1,6 @@ { - "hostname": {{ inventory_hostname }} - "initialization_output": {{ init_indy_node_result.stdout_lines }} - "node_ip": {{ hostvars[inventory_hostname]['tf_node_ip'] }} - "client_ip" {{ hostvars[inventory_hostname]['tf_client_ip'] }} + "hostname": "{{ inventory_hostname }}" + "initialization_output": "{{ init_indy_node_result.stdout_lines }}" + "node_ip": "{{ hostvars[inventory_hostname]['tf_node_ip'] }}" + "client_ip" "{{ hostvars[inventory_hostname]['tf_client_ip'] }}" } \ No newline at end of file From b56c252ab1f5493ecb3dc52cb4955298ee883718 Mon Sep 17 00:00:00 2001 From: Sylvain Martel Date: Tue, 20 Feb 2024 09:15:11 -0500 Subject: [PATCH 51/71] m --- ansible/indy_node/roles/indy_node/templates/init_output.j2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ansible/indy_node/roles/indy_node/templates/init_output.j2 b/ansible/indy_node/roles/indy_node/templates/init_output.j2 index 5d8b5d8..4521a7e 100644 --- a/ansible/indy_node/roles/indy_node/templates/init_output.j2 +++ b/ansible/indy_node/roles/indy_node/templates/init_output.j2 @@ -2,5 +2,5 @@ "hostname": "{{ inventory_hostname }}" "initialization_output": "{{ init_indy_node_result.stdout_lines }}" "node_ip": "{{ hostvars[inventory_hostname]['tf_node_ip'] }}" - "client_ip" "{{ hostvars[inventory_hostname]['tf_client_ip'] }}" + "client_ip": "{{ hostvars[inventory_hostname]['tf_client_ip'] }}" } \ No newline at end of file From 5854475d8bc111cb042ee0e040b8a256abc9b8c3 Mon Sep 17 00:00:00 2001 From: Sylvain Martel Date: Tue, 20 Feb 2024 09:54:43 -0500 Subject: [PATCH 52/71] m --- ansible/indy_node/roles/indy_node/templates/init_output.j2 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ansible/indy_node/roles/indy_node/templates/init_output.j2 b/ansible/indy_node/roles/indy_node/templates/init_output.j2 index 4521a7e..2082abf 100644 --- a/ansible/indy_node/roles/indy_node/templates/init_output.j2 +++ b/ansible/indy_node/roles/indy_node/templates/init_output.j2 @@ -3,4 +3,5 @@ "initialization_output": "{{ init_indy_node_result.stdout_lines }}" "node_ip": "{{ hostvars[inventory_hostname]['tf_node_ip'] }}" "client_ip": "{{ hostvars[inventory_hostname]['tf_client_ip'] }}" -} \ No newline at end of file +} + From 3773689af0befe3fe48cfb24d9c3be4669458d1a Mon Sep 17 00:00:00 2001 From: Sylvain Martel Date: Tue, 20 Feb 2024 11:13:29 -0500 Subject: [PATCH 53/71] m --- ansible/indy_node/roles/indy_node/templates/init_output.j2 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ansible/indy_node/roles/indy_node/templates/init_output.j2 b/ansible/indy_node/roles/indy_node/templates/init_output.j2 index 2082abf..22b3336 100644 --- a/ansible/indy_node/roles/indy_node/templates/init_output.j2 +++ b/ansible/indy_node/roles/indy_node/templates/init_output.j2 @@ -1,7 +1,9 @@ { +"{{ inventory_hostname }}":{ "hostname": "{{ inventory_hostname }}" - "initialization_output": "{{ init_indy_node_result.stdout_lines }}" + "initialization_output": "{{ init_indy_node_result | to_json }}" "node_ip": "{{ hostvars[inventory_hostname]['tf_node_ip'] }}" "client_ip": "{{ hostvars[inventory_hostname]['tf_client_ip'] }}" + } } From 53d38efb3705933b72376d5b15b06c098114b790 Mon Sep 17 00:00:00 2001 From: Sylvain Martel Date: Tue, 20 Feb 2024 13:23:16 -0500 Subject: [PATCH 54/71] m --- ansible/indy_node/roles/indy_node/templates/init_output.j2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ansible/indy_node/roles/indy_node/templates/init_output.j2 b/ansible/indy_node/roles/indy_node/templates/init_output.j2 index 22b3336..57c1147 100644 --- a/ansible/indy_node/roles/indy_node/templates/init_output.j2 +++ b/ansible/indy_node/roles/indy_node/templates/init_output.j2 @@ -1,7 +1,7 @@ { "{{ inventory_hostname }}":{ "hostname": "{{ inventory_hostname }}" - "initialization_output": "{{ init_indy_node_result | to_json }}" + "initialization_output": {{ init_indy_node_result.stdout_lines | to_json }} "node_ip": "{{ hostvars[inventory_hostname]['tf_node_ip'] }}" "client_ip": "{{ hostvars[inventory_hostname]['tf_client_ip'] }}" } From 346429e04786616e34fb7e85c3d75da6e52725a7 Mon Sep 17 00:00:00 2001 From: Sylvain Martel Date: Tue, 20 Feb 2024 13:30:26 -0500 Subject: [PATCH 55/71] m --- ansible/indy_node/roles/indy_node/templates/init_output.j2 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ansible/indy_node/roles/indy_node/templates/init_output.j2 b/ansible/indy_node/roles/indy_node/templates/init_output.j2 index 57c1147..ddede84 100644 --- a/ansible/indy_node/roles/indy_node/templates/init_output.j2 +++ b/ansible/indy_node/roles/indy_node/templates/init_output.j2 @@ -1,8 +1,8 @@ { "{{ inventory_hostname }}":{ - "hostname": "{{ inventory_hostname }}" - "initialization_output": {{ init_indy_node_result.stdout_lines | to_json }} - "node_ip": "{{ hostvars[inventory_hostname]['tf_node_ip'] }}" + "hostname": "{{ inventory_hostname }}", + {{ init_indy_node_result.stdout_lines | to_json }}, + "node_ip": "{{ hostvars[inventory_hostname]['tf_node_ip'] }}", "client_ip": "{{ hostvars[inventory_hostname]['tf_client_ip'] }}" } } From 907beecf64d8eb2b1d4dac94b4c7be3e1ab00419 Mon Sep 17 00:00:00 2001 From: Sylvain Martel Date: Tue, 20 Feb 2024 13:50:56 -0500 Subject: [PATCH 56/71] m --- ansible/indy_node/roles/indy_node/templates/init_output.j2 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ansible/indy_node/roles/indy_node/templates/init_output.j2 b/ansible/indy_node/roles/indy_node/templates/init_output.j2 index ddede84..408ecb8 100644 --- a/ansible/indy_node/roles/indy_node/templates/init_output.j2 +++ b/ansible/indy_node/roles/indy_node/templates/init_output.j2 @@ -1,9 +1,9 @@ { "{{ inventory_hostname }}":{ "hostname": "{{ inventory_hostname }}", - {{ init_indy_node_result.stdout_lines | to_json }}, - "node_ip": "{{ hostvars[inventory_hostname]['tf_node_ip'] }}", - "client_ip": "{{ hostvars[inventory_hostname]['tf_client_ip'] }}" + "initialization_output": {{ init_indy_node_result.stdout_lines | to_json }}, + "node_ip": "{{ hostvars[inventory_hostname]['tf_node_ip'] | to_json }}", + "client_ip": "{{ hostvars[inventory_hostname]['tf_client_ip'] | to_json }}" } } From 9e35c7152563f631e738a461920646734e90d9a9 Mon Sep 17 00:00:00 2001 From: Sylvain Martel Date: Tue, 20 Feb 2024 13:54:38 -0500 Subject: [PATCH 57/71] m --- ansible/indy_node/roles/indy_node/templates/init_output.j2 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ansible/indy_node/roles/indy_node/templates/init_output.j2 b/ansible/indy_node/roles/indy_node/templates/init_output.j2 index 408ecb8..7bbfc03 100644 --- a/ansible/indy_node/roles/indy_node/templates/init_output.j2 +++ b/ansible/indy_node/roles/indy_node/templates/init_output.j2 @@ -2,8 +2,8 @@ "{{ inventory_hostname }}":{ "hostname": "{{ inventory_hostname }}", "initialization_output": {{ init_indy_node_result.stdout_lines | to_json }}, - "node_ip": "{{ hostvars[inventory_hostname]['tf_node_ip'] | to_json }}", - "client_ip": "{{ hostvars[inventory_hostname]['tf_client_ip'] | to_json }}" + "node_ip": "{{ hostvars[inventory_hostname][tf_node_ip] | to_json }}", + "client_ip": "{{ hostvars[inventory_hostname][tf_client_ip] | to_json }}" } } From 627a6f593f8bdc09bf855567abf5f6b68bac23ba Mon Sep 17 00:00:00 2001 From: Sylvain Martel Date: Wed, 21 Feb 2024 09:06:25 -0500 Subject: [PATCH 58/71] m --- ansible/indy_node/roles/indy_node/defaults/main.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ansible/indy_node/roles/indy_node/defaults/main.yml b/ansible/indy_node/roles/indy_node/defaults/main.yml index 72c2abc..a9b6b66 100644 --- a/ansible/indy_node/roles/indy_node/defaults/main.yml +++ b/ansible/indy_node/roles/indy_node/defaults/main.yml @@ -1,8 +1,8 @@ --- indy_node_channel: rc indy_node_pkg: indy-node -indy_node_pkg_version: 1.13.2~rc6 -indy_plenum_pkg_version: 1.13.1~rc4 +indy_node_pkg_version: 1.13.2 +indy_plenum_pkg_version: 1.13.1 # Configuration Parameters cloud: azure From ce32beb2084c2c71b3d407e6751f39f3ea12a1a7 Mon Sep 17 00:00:00 2001 From: Sylvain Martel Date: Wed, 21 Feb 2024 09:56:18 -0500 Subject: [PATCH 59/71] m --- ansible/indy_node/roles/indy_node/defaults/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ansible/indy_node/roles/indy_node/defaults/main.yml b/ansible/indy_node/roles/indy_node/defaults/main.yml index a9b6b66..ae9dc3a 100644 --- a/ansible/indy_node/roles/indy_node/defaults/main.yml +++ b/ansible/indy_node/roles/indy_node/defaults/main.yml @@ -2,7 +2,7 @@ indy_node_channel: rc indy_node_pkg: indy-node indy_node_pkg_version: 1.13.2 -indy_plenum_pkg_version: 1.13.1 +indy_plenum_pkg_version: 1.13.1~rc4 # Configuration Parameters cloud: azure From 392dd1f0f33839cbf30762f48a3d7cf3b10d8899 Mon Sep 17 00:00:00 2001 From: Sylvain Martel Date: Wed, 21 Feb 2024 10:03:31 -0500 Subject: [PATCH 60/71] m --- ansible/indy_node/roles/indy_node/defaults/main.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ansible/indy_node/roles/indy_node/defaults/main.yml b/ansible/indy_node/roles/indy_node/defaults/main.yml index ae9dc3a..f00821b 100644 --- a/ansible/indy_node/roles/indy_node/defaults/main.yml +++ b/ansible/indy_node/roles/indy_node/defaults/main.yml @@ -1,8 +1,8 @@ --- -indy_node_channel: rc +indy_node_channel: stable indy_node_pkg: indy-node indy_node_pkg_version: 1.13.2 -indy_plenum_pkg_version: 1.13.1~rc4 +indy_plenum_pkg_version: 1.13.1 # Configuration Parameters cloud: azure From 1d2e812286cc8facc9ae5877bdb464f942e1444d Mon Sep 17 00:00:00 2001 From: Sylvain Martel Date: Wed, 21 Feb 2024 10:11:25 -0500 Subject: [PATCH 61/71] m --- ansible/indy_node/roles/indy_node/templates/init_output.j2 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ansible/indy_node/roles/indy_node/templates/init_output.j2 b/ansible/indy_node/roles/indy_node/templates/init_output.j2 index 7bbfc03..039bad6 100644 --- a/ansible/indy_node/roles/indy_node/templates/init_output.j2 +++ b/ansible/indy_node/roles/indy_node/templates/init_output.j2 @@ -2,8 +2,8 @@ "{{ inventory_hostname }}":{ "hostname": "{{ inventory_hostname }}", "initialization_output": {{ init_indy_node_result.stdout_lines | to_json }}, - "node_ip": "{{ hostvars[inventory_hostname][tf_node_ip] | to_json }}", - "client_ip": "{{ hostvars[inventory_hostname][tf_client_ip] | to_json }}" + "node_ip": {{ hostvars[inventory_hostname]['tf_node_ip'] | to_json }}, + "client_ip": {{ hostvars[inventory_hostname]['tf_client_ip'] | to_json }} } } From 41c7fffa4a5fd17acf3014fbe11157a930bb871b Mon Sep 17 00:00:00 2001 From: Sylvain Martel Date: Wed, 28 Feb 2024 14:25:57 -0500 Subject: [PATCH 62/71] m --- .../roles/indy_node/tasks/install.yml | 259 +++++++++--------- 1 file changed, 129 insertions(+), 130 deletions(-) diff --git a/ansible/indy_node/roles/indy_node/tasks/install.yml b/ansible/indy_node/roles/indy_node/tasks/install.yml index fbd0480..dfcccfb 100644 --- a/ansible/indy_node/roles/indy_node/tasks/install.yml +++ b/ansible/indy_node/roles/indy_node/tasks/install.yml @@ -10,147 +10,146 @@ - name: Install dependencies block: + # ============================= + # RocksDb and Dependenaces + #------------------------------ + - name: rocksdb + apt: + name: + - "rocksdb=5.8.8" + update_cache: true + become: true + tags: + - install + - package - # ============================= - # RocksDb and Dependenaces - #------------------------------ - - name: rocksdb - apt: - name: - - "rocksdb=5.8.8" - update_cache: true - become: true - tags: - - install - - package + - name: libgflags-dev + apt: + name: + - "libgflags-dev" + update_cache: true + become: true + tags: + - install + - package - - name: libgflags-dev - apt: - name: - - "libgflags-dev" - update_cache: true - become: true - tags: - - install - - package + - name: libsnappy-dev + apt: + name: + - "libsnappy-dev" + update_cache: true + become: true + tags: + - install + - package - - name: libsnappy-dev - apt: - name: - - "libsnappy-dev" - update_cache: true - become: true - tags: - - install - - package + - name: zlib1g-dev + apt: + name: + - "zlib1g-dev" + update_cache: true + become: true + tags: + - install + - package - - name: zlib1g-dev - apt: - name: - - "zlib1g-dev" - update_cache: true - become: true - tags: - - install - - package + - name: libbz2-dev + apt: + name: + - "libbz2-dev" + update_cache: true + become: true + tags: + - install + - package - - name: libbz2-dev - apt: - name: - - "libbz2-dev" - update_cache: true - become: true - tags: - - install - - package + - name: liblz4-dev + apt: + name: + - "liblz4-dev" + update_cache: true + become: true + tags: + - install + - package + # ============================= - - name: liblz4-dev - apt: - name: - - "liblz4-dev" - update_cache: true - become: true - tags: - - install - - package - # ============================= + - name: libssl1.0.0 + apt: + name: + - "libssl1.0.0" + update_cache: true + become: true + tags: + - install + - package - - name: libssl1.0.0 - apt: - name: - - "libssl1.0.0" - update_cache: true - become: true - tags: - - install - - package + # ============================= + # Ursa + # ----------------------------- + - name: ursa + apt: + name: + - "ursa=0.3.2-1" + update_cache: true + become: true + tags: + - install + - package - # ============================= - # Ursa - # ----------------------------- - - name: ursa - apt: - name: - - "ursa=0.3.2-1" - update_cache: true - become: true - tags: - - install - - package + - name: Move libursa.so to parent dirirectory + shell: > + if [ -d /usr/lib/ursa ]; then + mv /usr/lib/ursa/* /usr/lib && rm -rf /usr/lib/ursa + fi + become: true + tags: + - install + - package + # ============================= - - name: Move libursa.so to parent dirirectory - shell: > - if [ -d /usr/lib/ursa ]; then - mv /usr/lib/ursa/* /usr/lib && rm -rf /usr/lib/ursa - fi - become: true - tags: - - install - - package - # ============================= + - name: python3-libnacl + apt: + name: + - "python3-libnacl=1.6.1" + update_cache: true + become: true + tags: + - install + - package - - name: python3-libnacl - apt: - name: - - "python3-libnacl=1.6.1" - update_cache: true - become: true - tags: - - install - - package + - name: python3-ujson + apt: + name: + - "python3-ujson=1.33" + update_cache: true + become: true + tags: + - install + - package - - name: python3-ujson - apt: - name: - - "python3-ujson=1.33" - update_cache: true - become: true - tags: - - install - - package + - name: python3-sortedcontainers + apt: + name: + - "python3-sortedcontainers=1.5.7" + update_cache: true + become: true + tags: + - install + - package - - name: python3-sortedcontainers - apt: - name: - - "python3-sortedcontainers=1.5.7" - update_cache: true - become: true - tags: - - install - - package - - - name: indy-plenum - apt: - name: - - "indy-plenum={{ indy_plenum_pkg_version | default(indy_node_pkg_version) }}" - update_cache: true - become: true - tags: - - install - - package - when: - - indy_node_channel == "rc" - - distribution_codename == "focal" + - name: indy-plenum + apt: + name: + - "indy-plenum={{ indy_plenum_pkg_version | default(indy_node_pkg_version) }}" + update_cache: true + become: true + tags: + - install + - package + # when: + # - indy_node_channel == "rc" + # - distribution_codename == "focal" - name: Install indy-node package apt: @@ -160,4 +159,4 @@ become: true tags: - install - - package \ No newline at end of file + - package From f5eb18582ca1c8b849bba1c0e99bdfe116aa00c1 Mon Sep 17 00:00:00 2001 From: Sylvain Martel Date: Wed, 28 Feb 2024 14:40:13 -0500 Subject: [PATCH 63/71] m --- ansible/indy_node/roles/indy_node/tasks/install.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ansible/indy_node/roles/indy_node/tasks/install.yml b/ansible/indy_node/roles/indy_node/tasks/install.yml index dfcccfb..d9ca2f5 100644 --- a/ansible/indy_node/roles/indy_node/tasks/install.yml +++ b/ansible/indy_node/roles/indy_node/tasks/install.yml @@ -147,9 +147,9 @@ tags: - install - package - # when: - # - indy_node_channel == "rc" - # - distribution_codename == "focal" + when: + - indy_node_channel == "rc" + - distribution_codename == "focal" - name: Install indy-node package apt: From 0605cae75e77db91574b9c614f5ee65c968c35c0 Mon Sep 17 00:00:00 2001 From: Sylvain Martel Date: Wed, 28 Feb 2024 15:52:37 -0500 Subject: [PATCH 64/71] m --- ansible/indy_node/roles/indy_node/tasks/install.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ansible/indy_node/roles/indy_node/tasks/install.yml b/ansible/indy_node/roles/indy_node/tasks/install.yml index d9ca2f5..49f980e 100644 --- a/ansible/indy_node/roles/indy_node/tasks/install.yml +++ b/ansible/indy_node/roles/indy_node/tasks/install.yml @@ -148,7 +148,7 @@ - install - package when: - - indy_node_channel == "rc" + # - indy_node_channel == "rc" # removing this temporarely as to explicitly install the dependencies with the correct version. - distribution_codename == "focal" - name: Install indy-node package From ccb5f2140d2f7abed836d9feb12b58cd2a624144 Mon Sep 17 00:00:00 2001 From: Sylvain Martel Date: Wed, 28 Feb 2024 16:38:04 -0500 Subject: [PATCH 65/71] =?UTF-8?q?changement=20de=20priorit=C3=A9=20repo=20?= =?UTF-8?q?hyperledger?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ansible/indy_node/roles/indy_node/tasks/install.yml | 2 +- .../indy_node/templates/repository/hyperledger.pref.j2 | 3 +++ ansible/indy_node/roles/indy_node_repo/tasks/main.yml | 8 +++++++- 3 files changed, 11 insertions(+), 2 deletions(-) create mode 100644 ansible/indy_node/roles/indy_node/templates/repository/hyperledger.pref.j2 diff --git a/ansible/indy_node/roles/indy_node/tasks/install.yml b/ansible/indy_node/roles/indy_node/tasks/install.yml index 49f980e..d9ca2f5 100644 --- a/ansible/indy_node/roles/indy_node/tasks/install.yml +++ b/ansible/indy_node/roles/indy_node/tasks/install.yml @@ -148,7 +148,7 @@ - install - package when: - # - indy_node_channel == "rc" # removing this temporarely as to explicitly install the dependencies with the correct version. + - indy_node_channel == "rc" - distribution_codename == "focal" - name: Install indy-node package diff --git a/ansible/indy_node/roles/indy_node/templates/repository/hyperledger.pref.j2 b/ansible/indy_node/roles/indy_node/templates/repository/hyperledger.pref.j2 new file mode 100644 index 0000000..4da0414 --- /dev/null +++ b/ansible/indy_node/roles/indy_node/templates/repository/hyperledger.pref.j2 @@ -0,0 +1,3 @@ +Package: * +Pin: origin hyperledger.jfrog.io +Pin-Priority: 1001 \ No newline at end of file diff --git a/ansible/indy_node/roles/indy_node_repo/tasks/main.yml b/ansible/indy_node/roles/indy_node_repo/tasks/main.yml index 8304f8e..60f3f10 100644 --- a/ansible/indy_node/roles/indy_node_repo/tasks/main.yml +++ b/ansible/indy_node/roles/indy_node_repo/tasks/main.yml @@ -62,4 +62,10 @@ when: - distribution_codename == "focal" - indy_repo_node_channels|d(False, True) -# ============================================================================================================== \ No newline at end of file + +- name: Set Hyperledger repository priority + template: + src: hyperledger.pref.j2 + dest: /etc/apt/preferences.d/hyperledger.pref +# ============================================================================================================== + From 8c53b7b8a0fd18967f339bc29abac24862b79557 Mon Sep 17 00:00:00 2001 From: Sylvain Martel Date: Wed, 28 Feb 2024 16:56:39 -0500 Subject: [PATCH 66/71] m --- ansible/indy_node/roles/indy_node_repo/tasks/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ansible/indy_node/roles/indy_node_repo/tasks/main.yml b/ansible/indy_node/roles/indy_node_repo/tasks/main.yml index 60f3f10..cc3f4ea 100644 --- a/ansible/indy_node/roles/indy_node_repo/tasks/main.yml +++ b/ansible/indy_node/roles/indy_node_repo/tasks/main.yml @@ -65,7 +65,7 @@ - name: Set Hyperledger repository priority template: - src: hyperledger.pref.j2 + src: repository/hyperledger.pref.j2 dest: /etc/apt/preferences.d/hyperledger.pref # ============================================================================================================== From f5110122d13cd1cc8b525f4023d7266a36692037 Mon Sep 17 00:00:00 2001 From: Sylvain Martel Date: Wed, 10 Apr 2024 16:45:45 -0400 Subject: [PATCH 67/71] m Signed-off-by: Sylvain Martel --- .../indy_node/roles/indy_node/tasks/configure.yml | 12 ++++++++++++ .../roles/indy_node/templates/init_output.j2 | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/ansible/indy_node/roles/indy_node/tasks/configure.yml b/ansible/indy_node/roles/indy_node/tasks/configure.yml index 9985a4e..93d3905 100644 --- a/ansible/indy_node/roles/indy_node/tasks/configure.yml +++ b/ansible/indy_node/roles/indy_node/tasks/configure.yml @@ -209,6 +209,18 @@ dest: init_output.json delegate_to: localhost +- name: Add [ at the beginning of the file + lineinfile: + path: init_output.json + insertbefore: BOF + line: "[" + +- name: Add ] at the end of the file + lineinfile: + path: init_output.json + insertafter: EOF + line: "]" + # - name: Append all outputs to init_output.json # blockinfile: # path: init_output.json diff --git a/ansible/indy_node/roles/indy_node/templates/init_output.j2 b/ansible/indy_node/roles/indy_node/templates/init_output.j2 index 039bad6..96c72cb 100644 --- a/ansible/indy_node/roles/indy_node/templates/init_output.j2 +++ b/ansible/indy_node/roles/indy_node/templates/init_output.j2 @@ -5,5 +5,5 @@ "node_ip": {{ hostvars[inventory_hostname]['tf_node_ip'] | to_json }}, "client_ip": {{ hostvars[inventory_hostname]['tf_client_ip'] | to_json }} } -} +}, From 9f89d6a4c1605b9a85b17aa5991d33c31290348f Mon Sep 17 00:00:00 2001 From: Sylvain Martel Date: Wed, 10 Apr 2024 17:44:13 -0400 Subject: [PATCH 68/71] m Signed-off-by: Sylvain Martel --- ansible/indy_node/roles/indy_node/tasks/configure.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ansible/indy_node/roles/indy_node/tasks/configure.yml b/ansible/indy_node/roles/indy_node/tasks/configure.yml index 93d3905..8160a39 100644 --- a/ansible/indy_node/roles/indy_node/tasks/configure.yml +++ b/ansible/indy_node/roles/indy_node/tasks/configure.yml @@ -214,12 +214,14 @@ path: init_output.json insertbefore: BOF line: "[" + delegate_to: localhost - name: Add ] at the end of the file lineinfile: path: init_output.json insertafter: EOF line: "]" + delegate_to: localhost # - name: Append all outputs to init_output.json # blockinfile: From 8192d7f4b2586d4fde0e4e83cd9487474d078b23 Mon Sep 17 00:00:00 2001 From: Sylvain Martel Date: Wed, 10 Apr 2024 18:06:48 -0400 Subject: [PATCH 69/71] m Signed-off-by: Sylvain Martel --- ansible/indy_node/roles/indy_node/tasks/configure.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ansible/indy_node/roles/indy_node/tasks/configure.yml b/ansible/indy_node/roles/indy_node/tasks/configure.yml index 8160a39..0911384 100644 --- a/ansible/indy_node/roles/indy_node/tasks/configure.yml +++ b/ansible/indy_node/roles/indy_node/tasks/configure.yml @@ -221,7 +221,7 @@ path: init_output.json insertafter: EOF line: "]" - delegate_to: localhost + delegate_to: localhost # - name: Append all outputs to init_output.json # blockinfile: From 95958b17155b2648e8c0d888b5816173011ff06d Mon Sep 17 00:00:00 2001 From: Sylvain Martel Date: Thu, 23 May 2024 10:10:31 -0400 Subject: [PATCH 70/71] m Signed-off-by: Sylvain Martel --- ansible/indy_node/roles/indy_node/tasks/configure.yml | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/ansible/indy_node/roles/indy_node/tasks/configure.yml b/ansible/indy_node/roles/indy_node/tasks/configure.yml index 0911384..047c59c 100644 --- a/ansible/indy_node/roles/indy_node/tasks/configure.yml +++ b/ansible/indy_node/roles/indy_node/tasks/configure.yml @@ -223,16 +223,6 @@ line: "]" delegate_to: localhost -# - name: Append all outputs to init_output.json -# blockinfile: -# path: init_output.json -# marker: "# {mark} ANSIBLE MANAGED INIT OUTPUT" -# block: | -# {{ lookup('file', '/tmp/init_output_{{ inventory_hostname }}.json') }} -# create: true -# state: present -# delegate_to: localhost - - name: Print init_indy_node result debug: var: init_indy_node_result.stdout_lines From 1c11491acd5649799fb7947d1833a318e495ee9e Mon Sep 17 00:00:00 2001 From: Sylvain Martel Date: Thu, 23 May 2024 11:17:54 -0400 Subject: [PATCH 71/71] indy-node-aws module version Signed-off-by: Sylvain Martel --- terraform/aws/main.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/terraform/aws/main.tf b/terraform/aws/main.tf index 3ee34c1..13d74cc 100644 --- a/terraform/aws/main.tf +++ b/terraform/aws/main.tf @@ -2,7 +2,7 @@ # - When using elastic IP addresses, the limit is 5 per region # so, you are limited to 2 nodes using elastic IP addresses. module "indy-node" { - source = "github.com/ICCS-ISAC/terraform-aws-indy-node?ref=1.1.1" + source = "github.com/ICCS-ISAC/terraform-aws-indy-node?ref=1.2.0" count = var.candy_instance_count