OpenShift Installation Fails with Module Failure During "Gather Cluster facts" Task due to "KeyError: 'enterprise'"

Solution In Progress - Updated -

Issue

When trying to run OpenShift installation playbooks, the playbook fails with a module failure during the "Gather Cluster facts" task. The following error is seen in the verbose ansible logs:

TASK [Gather Cluster facts] ********************************************************************************************
...
<node.example.com> (0, 'Traceback (most recent call last):\r\n  File "/tmp/ansible_rj36tF/ansible_module_openshift_facts.py", line 1688, in <module>\r\n    main()\r\n  File "/tmp/ansible_rj36tF/ansible_module_openshift_facts.py", line 1675, in main\r\n    additive_facts_to_overwrite)\r\n  File "/tmp/ansible_rj36tF/ansible_module_openshift_facts.py", line 1340, in __init__\r\n    additive_facts_to_overwrite)\r\n  File "/tmp/ansible_rj36tF/ansible_module_openshift_facts.py", line 1383, in generate_facts\r\n    facts = set_version_facts_if_unset(facts)\r\n  File "/tmp/ansible_rj36tF/ansible_module_openshift_facts.py", line 543, in set_version_facts_if_unset\r\n    openshift_version = get_openshift_version(facts)\r\n  File "/tmp/ansible_rj36tF/ansible_module_openshift_facts.py", line 863, in get_openshift_version\r\n    version = get_container_openshift_version(facts)\r\n  File "/tmp/ansible_rj36tF/ansible_module_openshift_facts.py", line 903, in get_container_openshift_version\r\n    service_type = service_type_dict[deployment_type]\r\nKeyError: \'enterprise\'\r\n', 'Shared connection to node.example.com closed.\r\n')
fatal: [node.example.com]: FAILED! => {
    "changed": false, 
    "failed": true, 
    "module_stderr": "Shared connection to node.example.com closed.\r\n", 
    "module_stdout": "Traceback (most recent call last):\r\n  File \"/tmp/ansible_rj36tF/ansible_module_openshift_facts.py\", line 1688, in <module>\r\n    main()\r\n  File \"/tmp/ansible_rj36tF/ansible_module_openshift_facts.py\", line 1675, in main\r\n    additive_facts_to_overwrite)\r\n  File \"/tmp/ansible_rj36tF/ansible_module_openshift_facts.py\", line 1340, in __init__\r\n    additive_facts_to_overwrite)\r\n  File \"/tmp/ansible_rj36tF/ansible_module_openshift_facts.py\", line 1383, in generate_facts\r\n    facts = set_version_facts_if_unset(facts)\r\n  File \"/tmp/ansible_rj36tF/ansible_module_openshift_facts.py\", line 543, in set_version_facts_if_unset\r\n    openshift_version = get_openshift_version(facts)\r\n  File \"/tmp/ansible_rj36tF/ansible_module_openshift_facts.py\", line 863, in get_openshift_version\r\n    version = get_container_openshift_version(facts)\r\n  File \"/tmp/ansible_rj36tF/ansible_module_openshift_facts.py\", line 903, in get_container_openshift_version\r\n    service_type = service_type_dict[deployment_type]\r\nKeyError: 'enterprise'\r\n", 
    "msg": "MODULE FAILURE", 
    "rc": 0
}

Environment

  • Red Hat OpenShift Enterprise 3.1
  • Red Hat OpenShift Enterprise 3.2
  • Red Hat OpenShift Container Platform 3.3+

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content