question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Check-yaml exception for Ansible Vault

See original GitHub issue

Hi,

I’ve recently used the embed encrypt variables in my Ansible repos, and the check-yaml hook is failing because of the specific !vault usage.

Check Yaml...............................................................Failed
hookid: check-yaml

could not determine a constructor for the tag '!vault'
  in "inventories/group_vars/all.yml", line 62, column 13

Do you think it’s possible to add this as an exception inside the hook (and make it pass for everyone who’s using encypted variables in their playbooks) ?

Or should I add explicit exception inside my .pre-commit-config.yaml, for each files where I use those encrypted variables ?

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:11 (8 by maintainers)

github_iconTop GitHub Comments

2reactions
asottilecommented, Mar 19, 2018

Made a patch for this, please try it out! #274 (via args: [--unsafe])

0reactions
asottilecommented, May 21, 2020

yeah, yaml loading is all-or-nothing

Read more comments on GitHub >

github_iconTop Results From Across the Web

yamllint — Ansible Documentation
If you are a Red Hat customer, refer to the Ansible Automation Platform Life Cycle page for subscription details. yamllint . Check...
Read more >
Ansible for Junos OS Developer Guide - Juniper Networks
How to Authenticate the User Using an Ansible Vault-Encrypted File | 53 ... module in the Juniper.junos role, with the exception of the ......
Read more >
ansible-vault unexpected exception on Ubuntu - Rhys Campbell
When attempting to edit an ansible-vault file… ansible-vault edit roles/cassandra_backup/vars/test_s3_cfg.yaml. The following error was received ...
Read more >
Supported hooks - pre-commit
... check-yaml - checks yaml files for parseable syntax. debug-statements - checks for debugger imports and py37+ `breakpoint()` calls in python source.
Read more >
Avoid errors in your Ansible playbooks with ansible-lint
Ansible -lint goes beyond regular YAML linters by checking Ansible tasks themselves, potentially saving you from execution errors and many hours of ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found