diff --git a/scripts/ansible/restart_playbook.yml b/scripts/ansible/restart_playbook.yml index b87f610..ee43d0e 100755 --- a/scripts/ansible/restart_playbook.yml +++ b/scripts/ansible/restart_playbook.yml @@ -13,8 +13,4 @@ - name: ava-stop - name: ava-build - name: ava-reset - tasks: - - name: Start node - shell: "nohup {{ ava_binary }} --network-id={{ network_id }} --api-admin-enabled={{ api_admin_enabled }} --api-keystore-enabled={{ api_keystore_enabled }} --api-metrics-enabled={{ api_metrics_enabled }} --ava-tx-fee={{ ava_tx_fee }} --assertions-enabled={{ assertions_enabled }} --signature-verification-enabled={{ signature_verification_enabled }} --db-enabled={{ db_enabled }} --db-dir={{ db_dir }} --http-port={{ http_port }} --http-tls-enabled={{ http_tls_enabled }} --http-tls-key-file={{ http_tls_key_file }} --http-tls-cert-file={{ http_tls_cert_file }} --bootstrap-ips={{ bootstrap_ips }} --bootstrap-ids={{ bootstrap_ids }} --public-ip={{ ansible_host }} --staking-port={{ staking_port }} --staking-tls-enabled={{ staking_tls_enabled }} --staking-tls-key-file={{ staking_tls_key_file }} --staking-tls-cert-file={{ staking_tls_cert_file }} --plugin-dir={{ plugin_dir }} --log-dir={{ log_dir }} --log-level={{ log_level }} --snow-sample-size={{ snow_sample_size }} --snow-quorum-size={{ snow_quorum_size }} --snow-virtuous-commit-threshold={{ snow_virtuous_commit_threshold }} --snow-rogue-commit-threshold={{ snow_rogue_commit_threshold }} --snow-avalanche-num-parents={{ snow_avalanche_num_parents }} --snow-avalanche-batch-size={{ snow_avalanche_batch_size }} --api-ipcs-enabled={{ api_ipcs_enabled }} --xput-server-enabled={{ xput_server_enabled }} --xput-server-port={{ xput_server_port }} >/dev/null 2>&1 &" - environment: - PATH: /sbin:/usr/sbin:/bin:/usr/bin:/usr/local/bin:/snap/bin + - name: ava-start diff --git a/scripts/ansible/roles/ava-start/tasks/main.yml b/scripts/ansible/roles/ava-start/tasks/main.yml new file mode 100644 index 0000000..fc7f277 --- /dev/null +++ b/scripts/ansible/roles/ava-start/tasks/main.yml @@ -0,0 +1,38 @@ +- name: Start node + shell: + nohup {{ ava_binary }} + --network-id="{{ network_id }}" + --api-admin-enabled="{{ api_admin_enabled }}" + --api-keystore-enabled="{{ api_keystore_enabled }}" + --api-metrics-enabled="{{ api_metrics_enabled }}" + --ava-tx-fee="{{ ava_tx_fee }}" + --assertions-enabled="{{ assertions_enabled }}" + --signature-verification-enabled="{{ signature_verification_enabled }}" + --db-enabled="{{ db_enabled }}" + --db-dir="{{ db_dir }}" + --http-port="{{ http_port }}" + --http-tls-enabled="{{ http_tls_enabled }}" + --http-tls-key-file="{{ http_tls_key_file }}" + --http-tls-cert-file="{{ http_tls_cert_file }}" + --bootstrap-ips="{{ bootstrap_ips }}" + --bootstrap-ids="{{ bootstrap_ids }}" + --public-ip="{{ ansible_host }}" + --staking-port="{{ staking_port }}" + --staking-tls-enabled="{{ staking_tls_enabled }}" + --staking-tls-key-file="{{ staking_tls_key_file }}" + --staking-tls-cert-file="{{ staking_tls_cert_file }}" + --plugin-dir="{{ plugin_dir }}" + --log-dir="{{ log_dir }}" + --log-level="{{ log_level }}" + --snow-sample-size="{{ snow_sample_size }}" + --snow-quorum-size="{{ snow_quorum_size }}" + --snow-virtuous-commit-threshold="{{ snow_virtuous_commit_threshold }}" + --snow-rogue-commit-threshold="{{ snow_rogue_commit_threshold }}" + --snow-avalanche-num-parents="{{ snow_avalanche_num_parents }}" + --snow-avalanche-batch-size="{{ snow_avalanche_batch_size }}" + --api-ipcs-enabled="{{ api_ipcs_enabled }}" + --xput-server-enabled="{{ xput_server_enabled }}" + --xput-server-port="{{ xput_server_port }}" + >/dev/null 2>&1 & + environment: + PATH: /sbin:/usr/sbin:/bin:/usr/bin:/usr/local/bin:/snap/bin diff --git a/scripts/ansible/update_playbook.yml b/scripts/ansible/update_playbook.yml index bb32961..b704eee 100755 --- a/scripts/ansible/update_playbook.yml +++ b/scripts/ansible/update_playbook.yml @@ -12,8 +12,4 @@ roles: - name: ava-stop - name: ava-build - tasks: - - name: Start node - shell: "nohup {{ ava_binary }} --network-id={{ network_id }} --api-admin-enabled={{ api_admin_enabled }} --api-keystore-enabled={{ api_keystore_enabled }} --api-metrics-enabled={{ api_metrics_enabled }} --ava-tx-fee={{ ava_tx_fee }} --assertions-enabled={{ assertions_enabled }} --signature-verification-enabled={{ signature_verification_enabled }} --db-enabled={{ db_enabled }} --db-dir={{ db_dir }} --http-port={{ http_port }} --http-tls-enabled={{ http_tls_enabled }} --http-tls-key-file={{ http_tls_key_file }} --http-tls-cert-file={{ http_tls_cert_file }} --bootstrap-ips={{ bootstrap_ips }} --bootstrap-ids={{ bootstrap_ids }} --public-ip={{ ansible_host }} --staking-port={{ staking_port }} --staking-tls-enabled={{ staking_tls_enabled }} --staking-tls-key-file={{ staking_tls_key_file }} --staking-tls-cert-file={{ staking_tls_cert_file }} --plugin-dir={{ plugin_dir }} --log-dir={{ log_dir }} --log-level={{ log_level }} --snow-sample-size={{ snow_sample_size }} --snow-quorum-size={{ snow_quorum_size }} --snow-virtuous-commit-threshold={{ snow_virtuous_commit_threshold }} --snow-rogue-commit-threshold={{ snow_rogue_commit_threshold }} --snow-avalanche-num-parents={{ snow_avalanche_num_parents }} --snow-avalanche-batch-size={{ snow_avalanche_batch_size }} --api-ipcs-enabled={{ api_ipcs_enabled }} --xput-server-enabled={{ xput_server_enabled }} --xput-server-port={{ xput_server_port }} >/dev/null 2>&1 &" - environment: - PATH: /sbin:/usr/sbin:/bin:/usr/bin:/usr/local/bin:/snap/bin + - name: ava-start