简体   繁体   English

LooseVersion 实例没有属性版本 - openshift 错误中的 awx 安装

[英]LooseVersion instance has no attribute version - awx installation in openshift error

I am following the official documentation to install awx in openshift https://github.com/ansible/awx/blob/devel/INSTALL.md .我正在按照官方文档在 openshift https://github.com/ansible/awx/blob/devel/INSTALL.md中安装 awx。 The steps are under Openshift install steps .这些步骤在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 )当我更新库存文件并运行ansible-playbook -i inventory install.yml时,我在任务TASK [kubernetes: Use correct cli option for kubeconfig]中收到以下错误(请参阅此处的步骤)

ERROR: fatal: [localhost]: FAILED: => {"msg": "Version comparison: LooseVersion instance has no attribute 'version'"}错误: fatal: [localhost]: FAILED: => {"msg": "Version comparison: LooseVersion instance has no attribute 'version'"}

Using ansible version:使用 ansible 版本:

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'更新: oc versionoc version | sed -n 's/oc v//p' oc version | sed -n 's/oc v//p' is in the below image. oc version | sed -n 's/oc v//p'在下图中。

在此处输入图像描述

As a workaround I hard-coded this step to use --kubeconfig as I know my version is 4.2 (above 3.11)作为一种解决方法,我将此步骤硬编码为使用--kubeconfig因为我知道我的版本是 4.2(高于 3.11)

Just set oc_kubeconfig_option: '--kubeconfig' and I was successfully able to deploy an AWX instance.只需设置oc_kubeconfig_option: '--kubeconfig'我就能够成功部署 AWX 实例。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM