Closed emersonramos closed 3 years ago
I am not able to reproduce
changed: [localhost] => (item={'group_name': 'Openshift_Av_Arch', 'role_name': 'bp_arc_av'}) => {"ansible_loop_var": "item", "changed": true, "item": {"group_name": "Openshift_Av_Arch", "role_name": "bp_arc_av"}, "method": "create", "result": {"apiVersion": "rbac.authorization.k8s.io/v1", "kind": "RoleBinding", "metadata": {"creationTimestamp": "2021-02-28T15:00:15Z", "name": "bp_arc_av-Openshift_Av_Arch", "namespace": "default", "resourceVersion": "8073020", "selfLink": "/apis/rbac.authorization.k8s.io/v1/namespaces/default/rolebindings/bp_arc_av-Openshift_Av_Arch", "uid": "6a1af9fd-4eba-40b6-b2ee-8b4a067a5bcf"}, "roleRef": {"apiGroup": "rbac.authorization.k8s.io", "kind": "ClusterRole", "name": "bp_arc_av"}, "subjects": [{"apiGroup": "rbac.authorization.k8s.io", "kind": "Group", "name": "Openshift_Av_Arch"}]}}
changed: [localhost] => (item={'group_name': 'Openshift_Av_Aud', 'role_name': 'bp_aud_av'}) => {"ansible_loop_var": "item", "changed": true, "item": {"group_name": "Openshift_Av_Aud", "role_name": "bp_aud_av"}, "method": "create", "result": {"apiVersion": "rbac.authorization.k8s.io/v1", "kind": "RoleBinding", "metadata": {"creationTimestamp": "2021-02-28T15:00:16Z", "name": "bp_aud_av-Openshift_Av_Aud", "namespace": "default", "resourceVersion": "8073025", "selfLink": "/apis/rbac.authorization.k8s.io/v1/namespaces/default/rolebindings/bp_aud_av-Openshift_Av_Aud", "uid": "e1dbc251-6f5b-4682-b29d-1a27a44fa372"}, "roleRef": {"apiGroup": "rbac.authorization.k8s.io", "kind": "ClusterRole", "name": "bp_aud_av"}, "subjects": [{"apiGroup": "rbac.authorization.k8s.io", "kind": "Group", "name": "Openshift_Av_Aud"}]}}
# ansible-galaxy collection list | grep kuber
community.kubernetes 1.2.0
I am trying other things to reproduce this.
It's crazy because I have no changes on my environment.
I tried upgrade to 1.2.0, but I get same error.
I find out a difference between success and error logs.
On success, the module search patch is:
ansible-playbook 2.9.13 config file = /etc/ansible/ansible.cfg configured module search path = ['/var/lib/awx/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
On error logs, I get:
ansible-playbook 2.9.13 config file = /etc/ansible/ansible.cfg configured module search path = ['/var/lib/awx/venv/awx/lib64/python3.6/site-packages/awx/plugins/library']
I don't know why this difference.
In the error, your system is only looking in the module content that ships with AWX itself while the success runs is looking in modules (collections) installed into AWX and the system Ansible that presumably includes the latest version of this collection.
I'm pretty sure that is where your problem is at -- something is changing/overriding in your Tower system configuration search path. I'd recommend contacting Red Hat support for assistance if you can't figure out what's changing your system configuration.
SUMMARY
I'm using community.kubernetes modules to create any rolebindings using a template.
ISSUE TYPE
Error message:
COMPONENT NAME
common.py
ANSIBLE VERSION
CONFIGURATION
OS / ENVIRONMENT
Red Hat Enterprise Linux release 8.3 (Ootpa)
STEPS TO REPRODUCE
I'm using ansible tower. I'm using a template to apply rolebindings. I was using 1.1.1 version and it's working fine. I don't know why, I get this error. I tried to update to 1.2.0, but it's not solved.
J2
EXPECTED RESULTS
Turn to create rolebindings again
ACTUAL RESULTS