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

YAML parser - set source file position for vault encrypted strings #61660

Closed
wants to merge 1 commit into from

Conversation

commx
Copy link

@commx commx commented Sep 1, 2019

SUMMARY

The PR adds the source position to vault encrypted string objects read by the YAML parser, just like it is done for other YAML types (strings, sequences, mappings).

This rather small change will allow third-party script to query the source location of a specific variable by using VariableManager and similar techniques.

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

YAML Parser hotfix.

ADDITIONAL INFORMATION

Third-party scripts can query the source location of variables read by VariableManager by using the ansible_pos attribute of variables. However, this attribute is not set for vault encrypted strings while it is for the other YAML types. This PR will simply add the attribute for this kind of objects as well.

@ansibot ansibot added affects_2.9 This issue/PR affects Ansible v2.9 bug This issue/PR relates to a bug. core_review In order to be merged, this PR must follow the core review workflow. needs_triage Needs a first human triage before being processed. new_contributor This PR is the first contribution by a new community member. small_patch support:core This issue/PR relates to code supported by the Ansible Engineering Team. needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. and removed core_review In order to be merged, this PR must follow the core review workflow. labels Sep 1, 2019
@samdoran
Copy link
Contributor

samdoran commented Sep 5, 2019

Please add tests as well as a changelog fragment. See this fragment as an example.

@samdoran samdoran removed the needs_triage Needs a first human triage before being processed. label Sep 5, 2019
@ansibot ansibot added core_review In order to be merged, this PR must follow the core review workflow. stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested. and removed needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. labels Sep 13, 2019
@commx commx closed this Sep 18, 2019
@ansible ansible locked and limited conversation to collaborators Oct 16, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
affects_2.9 This issue/PR affects Ansible v2.9 bug This issue/PR relates to a bug. core_review In order to be merged, this PR must follow the core review workflow. new_contributor This PR is the first contribution by a new community member. small_patch stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested. support:core This issue/PR relates to code supported by the Ansible Engineering Team.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants