From bd528b23569a5a74b59c5dfa27b297c3ef28fe3e Mon Sep 17 00:00:00 2001 From: GitHub Actions Date: Mon, 27 Nov 2023 05:20:06 +0700 Subject: [PATCH] fix linting --- host_vars/zabbix.yaml | 13 ------- playbooks/polkadot_rotate.yaml | 14 ++++---- .../files/targets.yaml | 35 ------------------ .../files/targets.yaml.ignorelinting | 36 +++++++++++++++++++ 4 files changed, 44 insertions(+), 54 deletions(-) delete mode 100644 roles/setup_install_prometheus/files/targets.yaml create mode 100644 roles/setup_install_prometheus/files/targets.yaml.ignorelinting diff --git a/host_vars/zabbix.yaml b/host_vars/zabbix.yaml index 11bfa31..1f040f0 100644 --- a/host_vars/zabbix.yaml +++ b/host_vars/zabbix.yaml @@ -3,17 +3,4 @@ ansible_host: "65.21.107.112" ansible_port: "20780" host_name: "monitor.rotko.net" host_timezone: "Europe/Helsinki" - - # port reminder - # description: "monitoring" - # port_forwards: - # - from_port: "{{ hostvars['monitor']['ansible_port'] }}" - # to_host: "{{ hostvars['monitor']['container_ip'] }}:22" - # protocol: "tcp" - # - from_port: "{{ hostvars['monitor']['zabbix_port'] }}" - # to_host: "{{ hostvars['monitor']['container_ip'] }}:10050" - # protocol: "tcp" - # - from_port: "{{ hostvars['monitor']['zabbix_host_port'] }}" - # to_host: "{{ hostvars['monitor']['container_ip'] }}:10051" - # protocol: "tcp" ... diff --git a/playbooks/polkadot_rotate.yaml b/playbooks/polkadot_rotate.yaml index 656298a..c17d817 100644 --- a/playbooks/polkadot_rotate.yaml +++ b/playbooks/polkadot_rotate.yaml @@ -6,23 +6,25 @@ tasks: - name: Check if Cargo is installed - command: cargo --version + ansible.builtin.command: cargo --version register: cargo_installed failed_when: cargo_installed.rc != 0 and ('cargo' not in cargo_installed.stderr) - changed_when: false - ignore_errors: true + changed_when: False + ignore_errors: True - name: Setup and install Rust - include_role: + ansible.builtin.include_role: name: setup_install_rust when: cargo_installed is failed - name: Install websocat with cargo - command: cargo install websocat + ansible.builtin.command: cargo install websocat when: default_node_type in ["validator"] and cargo_installed is succeeded + # add pipefail - name: Rotate keys calling - shell: | + ansible.builtin.shell: | + set -o pipefail echo '{"id":1,"jsonrpc":"2.0","method":"author_rotateKeys","params":[]}' | websocat -n1 -B 99999999 ws://127.0.0.1:{{ default_rpc_port }} when: default_node_type in ["validator"] and cargo_installed is succeeded args: diff --git a/roles/setup_install_prometheus/files/targets.yaml b/roles/setup_install_prometheus/files/targets.yaml deleted file mode 100644 index 25931bc..0000000 --- a/roles/setup_install_prometheus/files/targets.yaml +++ /dev/null @@ -1,35 +0,0 @@ -1038 ± : cat ./group_vars/prometheus/targets.yaml [219d13h43m] ✹ -prometheus_targets: - node: -# ############################################################################## -# # RPC -# ############################################################################## - - targets: - - 192.168.69.13:7313 # polkadot-bkk03 - - 192.168.69.23:7323 # kusama-bkk03 - - 192.168.69.33:7333 # westend-bkk03 - - 192.168.69.14:7314 # polkadot-bkk04 - - 192.168.69.24:7324 # kusama-bkk04 - - 192.168.69.34:7334 # westend-bkk04 - labels: - node_type: rpc -# ############################################################################## -# # Bootnodes -# ############################################################################## - - targets: - # relay - - 192.168.69.214:7214 # polkadot - dot14.rotko.net - - 192.168.69.224:7224 # kusama - ksm14.rotko.net - - 192.168.69.234:7234 # westend - wnd14.rotko.net - # cumulus - - 192.168.69.241:7514 # polkadot asset hub - mint14.rotko.net - - 192.168.69.242:7524 # kusama asset hub - mine14.rotko.net - - 192.168.69.243:7534 # westend asset hub - wmint14.rotko.net - - 192.168.69.244:7543 # polkadot bridge hub - pbr13.rotko.net - - 192.168.69.245:7553 # kusama bridge hub - kbr13.rotko.net - - 192.168.69.246:7563 # westend bridge hub - wbr13.rotko.net - - 192.168.69.247:7573 # polkadot collectives hub - pch13.rotko.net - - 192.168.69.249:7593 # westend collectives hub - wch13.rotko.net - - 192.168.69.240:7504 # encointer - enc14.rotko.net - labels: - node_type: boot diff --git a/roles/setup_install_prometheus/files/targets.yaml.ignorelinting b/roles/setup_install_prometheus/files/targets.yaml.ignorelinting new file mode 100644 index 0000000..95167f1 --- /dev/null +++ b/roles/setup_install_prometheus/files/targets.yaml.ignorelinting @@ -0,0 +1,36 @@ +--- +prometheus_targets: + node: + # ############################################################################## + # # RPC + # ############################################################################## + - targets: + - 192.168.69.13:7313 # polkadot-bkk03 + - 192.168.69.23:7323 # kusama-bkk03 + - 192.168.69.33:7333 # westend-bkk03 + - 192.168.69.14:7314 # polkadot-bkk04 + - 192.168.69.24:7324 # kusama-bkk04 + - 192.168.69.34:7334 # westend-bkk04 + labels: + node_type: rpc + + # ############################################################################## + # # Bootnodes + # ############################################################################## + - targets: + # Relay + - 192.168.69.214:7214 # polkadot - dot14.rotko.net + - 192.168.69.224:7224 # kusama - ksm14.rotko.net + - 192.168.69.234:7234 # westend - wnd14.rotko.net + # Cumulus + - 192.168.69.241:7514 # polkadot asset hub - mint14.rotko.net + - 192.168.69.242:7524 # kusama asset hub - mine14.rotko.net + - 192.168.69.243:7534 # westend asset hub - wmint14.rotko.net + - 192.168.69.244:7543 # polkadot bridge hub - pbr13.rotko.net + - 192.168.69.245:7553 # kusama bridge hub - kbr13.rotko.net + - 192.168.69.246:7563 # westend bridge hub - wbr13.rotko.net + - 192.168.69.247:7573 # polkadot collectives hub - pch13.rotko.net + - 192.168.69.249:7593 # westend collectives hub - wch13.rotko.net + - 192.168.69.240:7504 # encointer - enc14.rotko.net + labels: + node_type: boot