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

chroot plugin fix inventory_hostname var for remote_addr #5570

Merged
merged 2 commits into from
Nov 17, 2022

Conversation

evanjarrett
Copy link
Contributor

SUMMARY

Add inventory_hostname to the vars under remote_addr to fix compatibility with ansible-core 2.13
A similar change was made to the lxd plugin here #4912

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

chroot connection plugin

ADDITIONAL INFORMATION

remote_addr value was being set to literal string 'inventory_hostname' instead of value of inventory_hostname variable.
Adding inventory_hostname to the vars: directive prevents the warnings as specified in https://github.com/ansible/ansible/blob/devel/lib/ansible/playbook/play_context.py#L320

@ansibullbot ansibullbot added bug This issue/PR relates to a bug connection connection plugin new_contributor Help guide this first time contributor plugins plugin (any type) labels Nov 17, 2022
@ansibullbot
Copy link
Collaborator

The test licenses failed with 2 errors:

changelogs/fragments/5570-chroot-plugin-fix-default-inventory_hostname:0:0: found no copyright notice
changelogs/fragments/5570-chroot-plugin-fix-default-inventory_hostname:0:0: must have at least one license

The test ansible-test sanity --test changelog [explain] failed with 1 error:

changelogs/fragments/5570-chroot-plugin-fix-default-inventory_hostname:0:0: extension must be one of: .yml, .yaml

The test ansible-test sanity --test changelog [explain] failed with 1 error:

changelogs/fragments/5570-chroot-plugin-fix-default-inventory_hostname:0:0: extension must be one of: .yml, .yaml

The test ansible-test sanity --test changelog [explain] failed with 1 error:

changelogs/fragments/5570-chroot-plugin-fix-default-inventory_hostname:0:0: extension must be one of: .yml, .yaml

The test ansible-test sanity --test changelog [explain] failed with 1 error:

changelogs/fragments/5570-chroot-plugin-fix-default-inventory_hostname:0:0: extension must be one of: .yml, .yaml

The test ansible-test sanity --test changelog [explain] failed with 1 error:

changelogs/fragments/5570-chroot-plugin-fix-default-inventory_hostname:0:0: extension must be one of: .yml, .yaml

click here for bot help

@ansibullbot ansibullbot added ci_verified Push fixes to PR branch to re-run CI needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR labels Nov 17, 2022
@github-actions
Copy link

github-actions bot commented Nov 17, 2022

Docs Build 📝

Thank you for contribution!✨

The docsite for this PR is available for download as an artifact from this run:
https://github.com/ansible-collections/community.general/actions/runs/3484700016

File changes:

  • M collections/community/general/chroot_connection.html
Click to see the diff comparison.

NOTE: only file modifications are shown here. New and deleted files are excluded.
See the file list and check the published docs to see those files.

diff --git a/home/runner/work/community.general/community.general/docsbuild/base/collections/community/general/chroot_connection.html b/home/runner/work/community.general/community.general/docsbuild/head/collections/community/general/chroot_connection.html
index b3e63c8..1f02787 100644
--- a/home/runner/work/community.general/community.general/docsbuild/base/collections/community/general/chroot_connection.html
+++ b/home/runner/work/community.general/community.general/docsbuild/head/collections/community/general/chroot_connection.html
@@ -206,6 +206,7 @@
 <p class="ansible-option-line"><span class="ansible-option-default-bold">Default:</span> <code class="ansible-option-default docutils literal notranslate"><span class="pre">&quot;inventory_hostname&quot;</span></code></p>
 <p class="ansible-option-line"><span class="ansible-option-configuration">Configuration:</span></p>
 <ul class="simple">
+<li><p>Variable: inventory_hostname</p></li>
 <li><p>Variable: ansible_host</p></li>
 </ul>
 </div></td>

@ansibullbot ansibullbot removed ci_verified Push fixes to PR branch to re-run CI needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR labels Nov 17, 2022
@felixfontein felixfontein added check-before-release PR will be looked at again shortly before release and merged if possible. backport-5 labels Nov 17, 2022
@felixfontein felixfontein merged commit 5e5af45 into ansible-collections:main Nov 17, 2022
@patchback
Copy link

patchback bot commented Nov 17, 2022

Backport to stable-5: 💚 backport PR created

✅ Backport PR branch: patchback/backports/stable-5/5e5af458fb431d742a22b1ba8642e30a75765667/pr-5570

Backported as #5572

🤖 @patchback
I'm built with octomachinery and
my source is open — https://github.com/sanitizers/patchback-github-app.

@felixfontein felixfontein removed the check-before-release PR will be looked at again shortly before release and merged if possible. label Nov 17, 2022
patchback bot pushed a commit that referenced this pull request Nov 17, 2022
* Add inventory_hostname under remote_addr.vars in chroot connection plugin required by ansible 2.13

* fix changelog fragment

(cherry picked from commit 5e5af45)
@patchback
Copy link

patchback bot commented Nov 17, 2022

Backport to stable-6: 💚 backport PR created

✅ Backport PR branch: patchback/backports/stable-6/5e5af458fb431d742a22b1ba8642e30a75765667/pr-5570

Backported as #5573

🤖 @patchback
I'm built with octomachinery and
my source is open — https://github.com/sanitizers/patchback-github-app.

@felixfontein
Copy link
Collaborator

@evanjarrett thanks for your contribution!

patchback bot pushed a commit that referenced this pull request Nov 17, 2022
* Add inventory_hostname under remote_addr.vars in chroot connection plugin required by ansible 2.13

* fix changelog fragment

(cherry picked from commit 5e5af45)
felixfontein pushed a commit that referenced this pull request Nov 17, 2022
* Add inventory_hostname under remote_addr.vars in chroot connection plugin required by ansible 2.13

* fix changelog fragment

(cherry picked from commit 5e5af45)

Co-authored-by: Evan Jarrett <ejfirestar00@gmail.com>
felixfontein pushed a commit that referenced this pull request Nov 17, 2022
* Add inventory_hostname under remote_addr.vars in chroot connection plugin required by ansible 2.13

* fix changelog fragment

(cherry picked from commit 5e5af45)

Co-authored-by: Evan Jarrett <ejfirestar00@gmail.com>
russoz pushed a commit to russoz-ansible/community.general that referenced this pull request Nov 27, 2022
…lections#5570)

* Add inventory_hostname under remote_addr.vars in chroot connection plugin required by ansible 2.13

* fix changelog fragment
russoz pushed a commit to russoz-ansible/community.general that referenced this pull request Nov 27, 2022
…lections#5570)

* Add inventory_hostname under remote_addr.vars in chroot connection plugin required by ansible 2.13

* fix changelog fragment
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue/PR relates to a bug connection connection plugin new_contributor Help guide this first time contributor plugins plugin (any type)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants