You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hope you are doing great.
This is my first post here, so I hope I am doing things correctly. I checked previous issues and I did not find this one.
SUMMARY
The first task works normally. The second task gets stuck with this weird error:
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: ansible_collections.kubernetes.core.plugins.module_utils.k8s.exceptions.CoreException: Failed to load resource definition: [Errno 13] Permission denied: '/root/ansible/Ansible/k8s_deployments/nginx.yaml'
fatal: [192.168.111.138]: FAILED! => {"changed": false, "msg": "Failed to load resource definition: [Errno 13] Permission denied: '/root/ansible/Ansible/k8s_deployments/nginx.yaml'"}
It is weird because I am running as root so I shouldn't face any permission issues.
The ansible target user is kube and it has all the requirements installed:
I tried to work with community.kubernetes.k8s and same error
Also, I tried to play around with the names of the nginx deployment and it is the same issue.
This is my repo if you want to check and take a look at the history: https://github.com/ibrahim-osama-amin/Ansible
It is weird because I am running as root so I shouldn't face any permission issues.
There is a line in log: <192.168.111.138> ESTABLISH SSH CONNECTION FOR USER: kube
Are you sure that you are running as root?
You can also try to change permissions for nginx.yaml or move the file under /home/kube/. Pay attention that this file is in /root/ansible/Ansible/k8s_deployments/ .
Also you can try to experiment with become keyword
Hello guys,
Hope you are doing great.
This is my first post here, so I hope I am doing things correctly. I checked previous issues and I did not find this one.
SUMMARY
The first task works normally. The second task gets stuck with this weird error:
It is weird because I am running as root so I shouldn't face any permission issues.
The ansible target user is kube and it has all the requirements installed:
I tried to work with community.kubernetes.k8s and same error
Also, I tried to play around with the names of the nginx deployment and it is the same issue.
This is my repo if you want to check and take a look at the history:
https://github.com/ibrahim-osama-amin/Ansible
ISSUE TYPE
COMPONENT NAME
community.kubernetes.k8s and kubernetes.core.k8s
ANSIBLE VERSION
COLLECTION VERSION
CONFIGURATION
OS / ENVIRONMENT
Ansible host:
Ansible target:
STEPS TO REPRODUCE
Create two Redhat VMs, install requirements on the source and the destination.
Run kubectl on the destination with user kube
EXPECTED RESULTS
I should see a pod created and a service created on the target.
ACTUAL RESULTS
The text was updated successfully, but these errors were encountered: