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

Aliases do not respect specified server roles #1316

Closed
corvuszero opened this issue Dec 19, 2024 · 2 comments
Closed

Aliases do not respect specified server roles #1316

corvuszero opened this issue Dec 19, 2024 · 2 comments

Comments

@corvuszero
Copy link

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'
@rahearn
Copy link

rahearn commented Jan 5, 2025

I'm also seeing this issue of -r being ignored when set in the alias.

Environment: macOS w/ kamal 2.4.0 installed via gem install

@djmb
Copy link
Collaborator

djmb commented Jan 17, 2025

Fixed by #1032

@djmb djmb closed this as completed Jan 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants