-
Notifications
You must be signed in to change notification settings - Fork 110
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
ansible template validation fails with SELinux errors using nsenter connection plugin #599
Comments
I don't really see what the nsenter connection plugin can do about this. @nitzmahone wasn't saying (as I understood it) that this is a problem with the nsenter connection plugin, but with the command line tool nsenter itself (which the plugin is using). The nsenter connection plugin basically prepends the command ansible wants to run with |
Yeah- after thinking about it some more, ultimately this is a really complex halting problem that doesn't necessarily have a generic solution. Having Off the top of my head, if you know that's not the case, you could add a couple of intermediate steps to template out to a tempfile, Given how (relatively) difficult testing the SELinux bits are, I'm guessing there wouldn't be a lot of appetite from the core team to add extra knobs to control the labeling of the tempfile inside The only reason I mentioned the connection plugin and/or |
@nitzmahone Thanks for taking another look!
Good point, I see. Might it be sensible to chcon the pre-validation template file only in the case where serole/setype/etc options of the template module are explicitly specified? That being said, Ansible normally writes everything with "unconfined_u:object_r:admin_home_t:s0" in /root/.ansible (if running as root) so the specific issue in this case must be something about a SELinux transition or something in podman, nsenter or iptables-restore. I tried the |
(suggest we move this back to ansible/ansible#80269, which I've reopened) |
SUMMARY
Please see all the details and reproduction steps here: ansible/ansible#80269
I thought it seemed like an issue with ansible template validation but an Ansible maintainer suggested it was an issue with the nsenter connection plugin; can you tell where the issue is?
ISSUE TYPE
COMPONENT NAME
nsenter connection plugin
ANSIBLE VERSION
COLLECTION VERSION
CONFIGURATION
OS / ENVIRONMENT
See linked issue.
STEPS TO REPRODUCE
See linked issue.
EXPECTED RESULTS
See linked issue.
ACTUAL RESULTS
See linked issue.
The text was updated successfully, but these errors were encountered: