Skip to content

Commit

Permalink
fix: tx-submit-api variable use
Browse files Browse the repository at this point in the history
Signed-off-by: Chris Gianelloni <[email protected]>
  • Loading branch information
wolf31o2 committed Nov 14, 2023
1 parent 142d2d3 commit 99551e5
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 11 deletions.
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'

0 comments on commit 99551e5

Please sign in to comment.