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

Bug: trellis vault edit staging "no such file" #356

Closed
5 tasks done
cspicuzza opened this issue Feb 6, 2023 · 2 comments · Fixed by #388
Closed
5 tasks done

Bug: trellis vault edit staging "no such file" #356

cspicuzza opened this issue Feb 6, 2023 · 2 comments · Fixed by #388
Labels
bug Something isn't working

Comments

@cspicuzza
Copy link
Sponsor

Terms

Description

What's wrong?

trellis vault edit staging throws an error

What have you tried?

trellis vault view staging -> works
trellis vault edit staging -> fails

What insights have you gained?

I can edit the file with
ansible-vault edit group_vars/staging/vault.yml

Possible solutions

Temporary workarounds

Steps To Reproduce

  1. Install Trellis using the cli
  2. configure group_vars
  3. trellis vault encrypt
  4. trellis vault edit staging

Expected Behavior

I expected to be able to edit my vault file

Actual Behavior

[Errno 2] No such file or directory: '/Users//Development/*.com/trellis/staging'

Relevant Log Output

No response

Versions

trellis cli 1.9.0

@cspicuzza cspicuzza added the bug Something isn't working label Feb 6, 2023
@swalkinshaw
Copy link
Member

This isn't technically a bug because it's the expected and documented behaviour. This command requires a file path, not an environment name:

trellis vault edit
Error: missing arguments (expected exactly 1, got 0)

Usage: trellis vault edit [options] FILE

Edit an encrypted file in place

Trellis docs: https://docs.roots.io/trellis/master/vault/
Ansible Vault docs: https://docs.ansible.com/ansible/latest/user_guide/vault.html

Edit production file:

  $ trellis vault edit group_vars/production/vault.yml

Arguments:
  FILE file name to edit

Options:
  -h, --help  show this help

However, right now the vault commands have a few inconsistencies and I agree it ideally should work this way. But there are differences with edit that make it a bit harder.

I'm leaving this open since I'm going to try and make all the vault commands more consistent.

@cspicuzza
Copy link
Sponsor Author

That makes sense. Sorry for reporting a non-bug

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants