-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* lint step was enabled Signed-off-by: kogeler <roman.gavrilov@parity.io>
- Loading branch information
Showing
100 changed files
with
1,324 additions
and
1,215 deletions.
There are no files selected for viewing
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,18 @@ | ||
name: check PR (secure_apt) | ||
|
||
on: | ||
pull_request: | ||
paths: | ||
- roles/secure_apt/** | ||
- .github/** | ||
|
||
jobs: | ||
run-molecule-tests: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
molecule-driver: [docker] | ||
uses: ./.github/workflows/reusable-molecule.yml | ||
with: | ||
role-name: secure_apt | ||
molecule-driver: ${{ matrix.molecule-driver }} |
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,18 @@ | ||
name: check PR (state_exporter) | ||
|
||
on: | ||
pull_request: | ||
paths: | ||
- roles/state_exporter/** | ||
- .github/** | ||
|
||
jobs: | ||
run-molecule-tests: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
molecule-driver: [docker] | ||
uses: ./.github/workflows/reusable-molecule.yml | ||
with: | ||
role-name: state_exporter | ||
molecule-driver: ${{ matrix.molecule-driver }} |
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
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,3 @@ | ||
--- | ||
skip_list: | ||
- name[casing] |
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,33 @@ | ||
--- | ||
# Based on ansible-lint config | ||
extends: default | ||
|
||
rules: | ||
braces: | ||
max-spaces-inside: 1 | ||
level: error | ||
brackets: | ||
max-spaces-inside: 1 | ||
level: error | ||
colons: | ||
max-spaces-after: -1 | ||
level: error | ||
commas: | ||
max-spaces-after: -1 | ||
level: error | ||
comments: disable | ||
comments-indentation: disable | ||
document-start: disable | ||
empty-lines: | ||
max: 3 | ||
level: error | ||
hyphens: | ||
level: error | ||
indentation: disable | ||
key-duplicates: enable | ||
line-length: disable | ||
new-line-at-end-of-file: disable | ||
new-lines: | ||
type: unix | ||
trailing-spaces: disable | ||
truthy: disable |
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,4 @@ | ||
--- | ||
skip_list: | ||
- name[casing] | ||
- name[template] |
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,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.