-
Notifications
You must be signed in to change notification settings - Fork 140
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
Action modules fail when running with local connection + become #675
Comments
The issue is reproductible, however I am wondering if this is not intended, because using the - copy:
src: /etc/kubernetes/admin.conf
dest: '{{ dest }}'
become: true Here is the output
|
It seems like there is a weird overall behaviour with action modules not being executed as root.. I feel like maybe this is an Ansible bug? |
Hello, In my opinion, this is not an Ansible bug. This behaviour is fine with the
Specifically:
|
I think this is because there is a part of this module that runs as an action module (which run locally), that part is the one that breaks! |
SUMMARY
When using the Kubernetes modules with
connection_type
set tolocal
, andbecome
set totrue
, the modules fail if thekubeconfig
path is not accessible by the user running Ansible.For example, I set
kubeconfig
to/etc/kubernetes/admin.conf
, my task hasbecome
set totrue
and I am running the playbook as the userubuntu
.It will try to read
/etc/kubernetes/admin.conf
and fail.ISSUE TYPE
COMPONENT NAME
kubernetes.core.k8s_cluster_info
ANSIBLE VERSION
COLLECTION VERSION
CONFIGURATION
OS / ENVIRONMENT
STEPS TO REPRODUCE
EXPECTED RESULTS
No crash
ACTUAL RESULTS
The text was updated successfully, but these errors were encountered: