Hi team,
I'm running ansible on centos 7 in which python 2 coming by default and some dependencies like yum etc is depended on that.
When Ansible is install it picking the default python2 as
INTERPRETER
Ansible --version
ansible 2.9.27
config file = /etc/ansible/ansible.cfg
configured module search path = [u'/home/centos/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
ansible python module location = /usr/lib/python2.7/site-packages/ansible
executable location = /usr/bin/ansible
python version = 2.7.5 (default, Jun 28 2022, 15:30:04) [GCC 4.8.5 20150623 (Red Hat 4.8.5-44)]
With the following link: I have set the Python INTERPRETER as Environment
IniSection [defaults]
Key interpreter_python
EnvironmentVariable ANSIBLE_PYTHON_INTERPRETER
Variablesname ansible_python_interpreter
But when I try executing kubernetes.core.helm: modules its throwing me an error:
TASK [adding] *************************************************************************************************************************************************************************************************
fatal: [ansible_host="HOST IP"]: FAILED! => {"msg": "Unable to import kubernetes.core.helm due to invalid syntax"}
here is my sample playbook
---
- hosts: host
gather_facts: true
tasks:
- name: Install Nginx Chart
kubernetes.core.helm:
name: nginx-server
namespace: default
chart_ref: bitnami/nginx
on the other hand when i check the syntax of ansible playbook following the command
ansible-playbook <playbook.yaml> --syntax-check
response is ok
Can you please assist me how can we fix this issue