-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: kogeler <[email protected]>
- Loading branch information
kogeler
committed
Nov 24, 2023
1 parent
12e42be
commit 41297f5
Showing
94 changed files
with
1,193 additions
and
1,225 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
skip_list: | ||
- name[casing] | ||
- empty-string-compare # Don't compare to empty string | ||
- experimental # all rules tagged as experimental | ||
- "306" # Ignore not setting pipefail - required for sh shell | ||
- name[template] # Style enforcement |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,32 @@ | ||
--- | ||
- name: Check session key | Generate session | ||
ansible.builtin.set_fact: | ||
key_inject_session_key: "0x\ | ||
{% for key in key_inject_relay_chain_key_list %}\ | ||
{{ (key.priv_key | parity.chain.subkey_inspect(scheme=(key.scheme | default('sr25519')) )).publicKey.replace('0x','') }}\ | ||
{% endfor %}" | ||
key_inject_session_key: "0x{% for key in key_inject_relay_chain_key_list %}{{ (key.priv_key | parity.chain.subkey_inspect(scheme=(key.scheme | default('sr25519')))).publicKey.replace('0x', | ||
'') }}{% endfor %}" | ||
|
||
- name: Check session key | Run rpc | ||
ansible.builtin.uri: | ||
url: "http://127.0.0.1:{{ key_inject_relay_chain_rpc_port }}" | ||
url: http://127.0.0.1:{{ key_inject_relay_chain_rpc_port }} | ||
method: POST | ||
body: | ||
jsonrpc: "2.0" | ||
method: "author_hasSessionKeys" | ||
method: author_hasSessionKeys | ||
params: ["{{ key_inject_session_key }}"] | ||
id: 1 | ||
body_format: json | ||
headers: | ||
Content-Type: 'application/json' | ||
Content-Type: application/json | ||
use_proxy: false | ||
changed_when: false | ||
check_mode: false | ||
register: key_inject_has_session_keys | ||
|
||
- name: Check session key | Debug | ||
debug: | ||
ansible.builtin.debug: | ||
msg: "RPC call failed: {{ key_inject_has_session_keys.json }}" | ||
when: key_inject_has_session_keys.json.result is not defined | ||
|
||
- name: Check session key | Check | ||
ansible.builtin.debug: | ||
msg: "Session Key {{ key_inject_session_key }} is {{ 'NOT ' if not key_inject_has_session_keys.json.result else '' }}present in keystore" | ||
changed_when: not key_inject_has_session_keys.json.result | ||
msg: Session Key {{ key_inject_session_key }} is {{ 'NOT ' if not key_inject_has_session_keys.json.result else '' }}present in keystore | ||
changed_when: not key_inject_has_session_keys.json.result |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,26 @@ | ||
- block: | ||
--- | ||
- tags: [key-inject, key_inject] | ||
block: | ||
- name: Parachain keys | ||
ansible.builtin.include_tasks: inject.yml | ||
loop: | ||
- rpc_port: "{{ key_inject_parachain_rpc_port }}" | ||
scheme: "{{ key_inject_parachain_scheme }}" | ||
type: aura | ||
priv_key: "{{ key_inject_parachain_aura_private_key }}" | ||
loop_control: | ||
label: Parachain {{ item.type }} key | ||
when: key_inject_parachain_aura_private_key is defined | ||
|
||
- name: Relaychain keys | ||
ansible.builtin.include_tasks: inject.yml | ||
loop: "{{ key_inject_relay_chain_key_list }}" | ||
loop_control: | ||
label: Relaychain {{ item.type }} key | ||
when: key_inject_relay_chain_key_list is defined | ||
|
||
- name: Parachain keys | ||
ansible.builtin.include_tasks: inject.yml | ||
loop: | ||
- rpc_port: "{{ key_inject_parachain_rpc_port }}" | ||
scheme: "{{ key_inject_parachain_scheme }}" | ||
type: "aura" | ||
priv_key: "{{ key_inject_parachain_aura_private_key }}" | ||
loop_control: | ||
label: "Parachain {{ item.type }} key" | ||
when: key_inject_parachain_aura_private_key is defined | ||
|
||
- name: Relaychain keys | ||
ansible.builtin.include_tasks: inject.yml | ||
loop: "{{ key_inject_relay_chain_key_list }}" | ||
loop_control: | ||
label: "Relaychain {{ item.type }} key" | ||
when: key_inject_relay_chain_key_list is defined | ||
|
||
- name: Check session key is present | ||
ansible.builtin.include_tasks: check_seesion_key.yml | ||
when: | ||
- key_inject_relay_chain_key_list is defined | ||
- key_inject_check_session_key | ||
|
||
tags: ['key-inject', 'key_inject'] | ||
- name: Check session key is present | ||
ansible.builtin.include_tasks: check_seesion_key.yml | ||
when: | ||
- key_inject_relay_chain_key_list is defined | ||
- key_inject_check_session_key |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
skip_list: | ||
- name[casing] | ||
- empty-string-compare # Don't compare to empty string | ||
- experimental # all rules tagged as experimental | ||
- "306" # Ignore not setting pipefail - required for sh shell | ||
- name[template] # Style enforcement |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
nginx_letsencrypt_email: "[email protected]" | ||
--- | ||
nginx_letsencrypt_email: [email protected] | ||
nginx_letsencrypt_mock: false | ||
nginx_dhparam_size: 4096 | ||
nginx_worker_rlimit_nofile: 30000 | ||
# requests per second | ||
nginx_max_request_rate: 2 | ||
nginx_burst_request_rate: 5 | ||
|
||
|
||
# print extended data about clients | ||
nginx_log_extended_enable: false | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,7 @@ | ||
--- | ||
|
||
- name: reload nginx config | ||
ansible.builtin.systemd: | ||
name: "nginx" | ||
name: nginx | ||
state: reloaded | ||
enabled: yes | ||
daemon_reload: yes | ||
enabled: true | ||
daemon_reload: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,31 @@ | ||
--- | ||
## Molecule | ||
ansible_user: root | ||
|
||
nginx_letsencrypt_mock: true | ||
nginx_dhparam_size: 1024 | ||
nginx_sites: | ||
- template: site-rpc.j2 | ||
domain: "a.rpc.lan" | ||
domain: a.rpc.lan | ||
ssl_issuer: letsencrypt | ||
params: | ||
rpc_port: 9933 | ||
rpc_ws_port: 9944 | ||
- template: site-rpc.j2 | ||
domain: "b.rpc.lan" | ||
domain: b.rpc.lan | ||
ssl_issuer: manual | ||
ssl_manual_cert_file: "test1.pem" | ||
ssl_manual_cert_file: test1.pem | ||
params: | ||
rpc_port: 9933 | ||
rpc_ws_port: 9944 | ||
- template: site-connect.j2 | ||
domain: "c.rpc.lan" | ||
domain: c.rpc.lan | ||
ssl_issuer: letsencrypt | ||
params: | ||
connect_port: 9944 | ||
- template: site-connect.j2 | ||
domain: "d.rpc.lan" | ||
domain: d.rpc.lan | ||
ssl_issuer: manual | ||
ssl_manual_cert_file: "test2.pem" | ||
ssl_manual_cert_file: test2.pem | ||
params: | ||
connect_port: 9944 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.