Skip to content

Aliases do not respect specified server roles #1316

@corvuszero

Description

@corvuszero

Following the documentation here and assuming a deploy.yml like this:

servers:
  admin:
    hosts:
      - admin-host.com
    proxy: true
  api:
    - api-host.com

aliases:
  admin_console: app exec -r admin --interactive --reuse "bin/rails console"

Using the kamal admin_console alias executes the command on the api server: api-host.com.

Calling kamal admin_console -r admin does execute the command on the admin role, same as not using the alias at all: kamal app exec -r admin --interactive --reuse "bin/rails console".

Additional details

I am using kamal dockerized:

alias kamal='docker run -it --rm --env-file SECRET.env -v "${PWD}:/workdir" -v "${SSH_AUTH_SOCK}:/ssh-agent" -v /var/run/docker.sock:/var/run/docker.sock -e "SSH_AUTH_SOCK=/ssh-agent" ghcr.io/basecamp/kamal:latest'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions