# Ansible-lint throwing Internal error in VScode when referencing vaulted var\_file

**URL:** <https://forum.ansible.com/t/ansible-lint-throwing-internal-error-in-vscode-when-referencing-vaulted-var-file/2475>\
**Category:** Get Help\
**Tags:** ansible-lint\
**Created:** [November 21, 2023, 12:15am UTC](https://forum.ansible.com/t/ansible-lint-throwing-internal-error-in-vscode-when-referencing-vaulted-var-file/2475 "2023-11-21T00:15:32Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![gawainsr](https://avatars.discourse-cdn.com/v4/letter/g/7ea924/32.png) [@gawainsr](https://forum.ansible.com/u/gawainsr)\
**Post date:** [November 21, 2023, 12:15am UTC](https://forum.ansible.com/t/ansible-lint-throwing-internal-error-in-vscode-when-referencing-vaulted-var-file/2475/1 "2023-11-21T00:15:32Z")

</div>

I’m trying to debug an issue where ansible-lint is throwing an exception with playbooks that I’m referencing a vaulted var\_file in,

Below is the full error:  
[{  
“resource”: “/home/me/ansible/playbooks/me/poc/demo\_2023-11-cleanup.yml”,  
“owner”: “_generated\_diagnostic\_collection\_name_#1”,  
“code”: {  
“value”: “internal-error”,  
“target”: {  
“$mid”: 1,  
“external”: “[internal-error - Ansible Lint Documentation](https://ansible-lint.readthedocs.io/rules/internal-error/)”,  
“path”: “/rules/internal-error/”,  
“scheme”: “https”,  
“authority”: “[ansible-lint.readthedocs.io](http://ansible-lint.readthedocs.io)”  
}  
},  
“severity”: 8,  
“message”: “Unexpected error code 1 from execution of: ansible-playbook -i localhost, --syntax-check ansible/playbooks/me/poc/demo\_2023-11-cleanup.yml”,  
“source”: “ansible-lint”,  
“startLineNumber”: 1,  
“startColumn”: 1,  
“endLineNumber”: 1,  
“endColumn”: 2147483648  
}]

Here is a copy of the playbook.

```auto
# Playbook for purging snapshots left behind by the demo_2023-11 playbooks
# To run this playbook, cd to the root ansible directory and run the command;
# ansible-playbook -i inventory/test/me_test.yml playbooks/me/poc/demo_2023-11-cleanup.yml --vault-id secrets_private@prompt  
---
- name: Delete Snaps
  hosts: demo_group
  become: true
  gather_facts: yes
  vars:
    install_updates: true 
    snapshot_name: 'all' # Specify pattern here. Use "all" to remove all snapshots.
  vars_files:
    - "~/ansible/vault/.ansible_secrets_private.yml"

  tasks:
    - name: Delete matching snapshots
      include_role:
        name: vmware_snapshot_delete

```

Any help would be much appreciated!

---

<div class="post-metadata">

**Author:** ![gawainsr](https://avatars.discourse-cdn.com/v4/letter/g/7ea924/32.png) [@gawainsr](https://forum.ansible.com/u/gawainsr)\
**Post date:** [November 27, 2023, 11:16pm UTC](https://forum.ansible.com/t/ansible-lint-throwing-internal-error-in-vscode-when-referencing-vaulted-var-file/2475/2 "2023-11-27T23:16:31Z")

</div>

Bumping this post up as no replies ☹

---

<div class="post-metadata">

**Author:** ![jbericat](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/jbericat/32/627_2.png) [@jbericat](https://forum.ansible.com/u/jbericat)\
**Post date:** [December 11, 2023, 1:16am UTC](https://forum.ansible.com/t/ansible-lint-throwing-internal-error-in-vscode-when-referencing-vaulted-var-file/2475/3 "2023-12-11T01:16:47Z")

</div>

Hello @gawainsr,

I stumbled upon this unresolved help request while browsing the forum. Before diving into it, I wanted to check if it’s related to another thread you opened a few days ago. In that previous thread, I suggested a workaround. Here’s the link to refresh your memory:

> [@Securely Storing Personal Credentials for Ansible Without Compromising Convenience](http://forum.ansible.com/t/securely-storing-personal-credentials-for-ansible-without-compromising-convenience/2604/6):
>
> Hello @gawainsr, Let’s recap our discussion a bit: You’ve expressed a preference for maintaining a balance between security and ease of use, aiming to manage personal credentials within a shared environment without making extensive infrastructure changes, as mentioned in your earlier post: Given this, it seems you’re inclined to proceed with the ansible-vault method, despite considering alternative options previously suggested to you, is that correct? On the other hand, you’ve also set spec…

Could you take a moment to check if the solution provided in the other thread resolves your issue? If it doesn’t, I’ll be more than happy to assist you with this one. I’ve bookmarked it so I won’t forget.

Cheers!

---

<div class="post-metadata">

**Author:** ![Ismar\_Kunic](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/ismar_kunic/32/8294_2.png) [@Ismar\_Kunic](https://forum.ansible.com/u/Ismar_Kunic)\
**Post date:** [April 30, 2025, 7:42am UTC](https://forum.ansible.com/t/ansible-lint-throwing-internal-error-in-vscode-when-referencing-vaulted-var-file/2475/4 "2025-04-30T07:42:19Z")

</div>

Hello there,

To solve this problem, you need to add skip\_list section to your .ansible-lint file with the following line

```yaml
skip_list:
  - internal-error

```

---

<div class="post-metadata">

**Author:** ![tertek](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/tertek/32/9181_2.png) [@tertek](https://forum.ansible.com/u/tertek)\
**Post date:** [January 22, 2026, 7:36am UTC](https://forum.ansible.com/t/ansible-lint-throwing-internal-error-in-vscode-when-referencing-vaulted-var-file/2475/5 "2026-01-22T07:36:02Z")

</div>

This resolves the problem. Thank you
