Skip to content
New issue

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

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

Already on GitHub? # to your account

Vault-encrypted variables fail string validation #99

Closed
3 tasks
acidroper opened this issue Nov 18, 2024 · 0 comments
Closed
3 tasks

Vault-encrypted variables fail string validation #99

acidroper opened this issue Nov 18, 2024 · 0 comments
Assignees
Labels
bug Something isn't working
Milestone

Comments

@acidroper
Copy link

Description
If the one_pass or context.PASSWORD variables are encrypted with ansible-vault, they fail the validation check:

FAILED! => {
    "assertion": "one_pass is undefined or one_pass is none or one_pass is string",
    "changed": false,
    "evaluated_to": false,
    "msg": "Please make sure [context.PASSWORD, one_pass, one_token, one_version] are valid strings."
}

To Reproduce
Encrypt the one_pass variable with ansible-vault:

one_pass: !vault |
          $ANSIBLE_VAULT;1.1;AES256
          3436396339323131396166663537386532636135316338333134666161613739
          613436373964380a323462306537656364623733396163623765306663343532
          3863366664346632656532363866373734326535653463303563366338363141

Expected behavior
Vault-encrypted variables should pass the validation.

Details

  • Ansible version: 2.16.12

Additional context
This issue appears related to ansible/ansible#75646 and could be resolved by implementing the vault_encrypted test.

Progress Status

  • Code committed
  • Testing - QA
  • Documentation (Release notes - resolved issues, compatibility, known issues)
@rsmontero rsmontero added this to the Release 1.2.1 milestone Jan 8, 2025
@rsmontero rsmontero added the bug Something isn't working label Jan 8, 2025
sk4zuzu added a commit that referenced this issue Feb 13, 2025
- Make sure precheck role doesn't fail
- Extend Makefile so it detects if --ask-vault-pass is required
rsmontero pushed a commit that referenced this issue Feb 17, 2025
- Make sure precheck role doesn't fail
- Extend Makefile so it detects if --ask-vault-pass is required
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants