Ansible Playbook ignoring variables form the inventory while trying to add a node to the OpenShift Cluster

Solution Verified - Updated -

Issue

  • When running ansible-playbook -D -i /path/to/the/inventory /usr/share/ansible/openshift-ansible/playbooks/openshift-node/scaleup.yml the following error occurs:
FAILED! => {"failed": true, "msg": "The task includes an option with an undefined variable. The error was: 'openshift_deployment_type' is undefined\n\nThe error appears to have been in '/usr/share/ansible/openshift-ansible/playbooks/init/cluster_facts.yml': line 9, column 5, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n  tasks:\n  - name: Gather Cluster facts\n    ^ here\n\nexception type: <class 'ansible.errors.AnsibleUndefinedVariable'>\nexception: 'openshift_deployment_type' is undefined"}
  • It turns out that the playbook doesn't use most of the variables set in the inventory.

Environment

  • OpenShift Container Platform 3.9

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In