I am following the official documentation to install awx in openshift https://github.com/ansible/awx/blob/devel/INSTALL.md. The steps are under Openshift install steps
.
When I update the inventory file and run ansible-playbook -i inventory install.yml
I get the following error in Task TASK [kubernetes : Use correct cli option for kubeconfig]
(please refer to the step here)
ERROR:
fatal: [localhost]: FAILED! => {"msg": "Version comparison: LooseVersion instance has no attribute 'version'"}
Using ansible version:
ansible 2.9.7
config file = /etc/ansible/ansible.cfg
configured module search path = [u'/root/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
ansible python module location = /usr/lib/python2.7/site-packages/ansible
executable location = /bin/ansible
python version = 2.7.5
I am not able to find any solutions online, any help is much appreciated.
UPDATE: Output of oc version
and oc version | sed -n 's/oc v//p'
is in the below image.
As a workaround I hard-coded this step to use --kubeconfig
as I know my version is 4.2 (above 3.11)
Just set oc_kubeconfig_option: '--kubeconfig'
and I was successfully able to deploy an AWX instance.