Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: tx-submit-api variable use #18

Merged
merged 1 commit into from
Nov 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion roles/tx_submit_api/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ cardano_node_group: root
tx_submit_api_docker_image: 'ghcr.io/blinklabs-io/tx-submit-api:{{ tx_submit_api_version }}'

# Docker container name
tx_submit_api_docker_container_name: cardano-submit-api
tx_submit_api_docker_container_name: tx-submit-api

# Port for host/container
tx_submit_api_container_port: 8090
Expand Down
12 changes: 6 additions & 6 deletions roles/tx_submit_api/tasks/docker.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
---
- name: Create container
docker_container:
name: '{{ cardano_submit_api_docker_container_name }}'
image: '{{ cardano_submit_api_docker_image }}'
name: '{{ tx_submit_api_docker_container_name }}'
image: '{{ tx_submit_api_docker_image }}'
restart_policy: unless-stopped
ports:
- '{{ cardano_submit_api_port }}:{{ cardano_submit_api_container_port }}'
- '{{ cardano_submit_api_metrics_port }}:{{ cardano_submit_api_metrics_container_port }}'
- '{{ tx_submit_api_port }}:{{ tx_submit_api_container_port }}'
- '{{ tx_submit_api_metrics_port }}:{{ tx_submit_api_metrics_container_port }}'
env:
CARDANO_NETWORK: '{{ cardano_submit_api_network }}'
CARDANO_NETWORK: '{{ tx_submit_api_network }}'
volumes:
- '{{ cardano_node_ipc_dir }}:{{ cardano_submit_api_ipc_container_dir }}'
- '{{ cardano_node_ipc_dir }}:{{ tx_submit_api_ipc_container_dir }}'
7 changes: 3 additions & 4 deletions roles/tx_submit_api/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
_allowed_install_methods: ['docker']
ansible.builtin.assert:
that:
- cardano_submit_api_install_method in _allowed_install_methods
fail_msg: 'The specified install method ({{ cardano_submit_api_install_method }}) is not one of the allowed values ({{ _allowed_install_methods | join(", ") }})'
- tx_submit_api_install_method in _allowed_install_methods
fail_msg: 'The specified install method ({{ tx_submit_api_install_method }}) is not one of the allowed values ({{ _allowed_install_methods | join(", ") }})'

# We use the node owner and group
- name: Create directories
Expand All @@ -16,9 +16,8 @@
group: '{{ cardano_node_group }}'
mode: '0755'
loop:
- '{{ cardano_node_dir }}'
- '{{ cardano_node_ipc_dir }}'

- name: Include docker-related tasks
ansible.builtin.include_tasks: docker.yml
when: cardano_submit_api_install_method == 'docker'
when: tx_submit_api_install_method == 'docker'
Loading