ocp-power-automation / ocp4-upi-powervm-hmc

OpenShift on IBM PowerVM servers managed using HMC
Apache License 2.0
6 stars 6 forks source link

Fatal undefined variable error when running ansible-playbook -e @vars-powervm.yaml playbooks/main.yaml #4

Closed djlwilder closed 3 years ago

djlwilder commented 3 years ago

Seeing this error when running: ansible-playbook -e @vars-powervm.yaml playbooks/main.yaml

fatal: [9.114.219.127]: FAILED! => {"msg": "The task includes an option with an undefined variable. The error was: 'dict object' has no attribute 'product_repo'\n\nThe error appears to be in '/home/wilder/ocp4.8-install/ocp4-upi-powervm-hmc/playbooks/ocp4-helpernode/tasks/setfacts.yaml': line 41, column 5, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n\n - set_fact:\n ^ here\n"}

I found that commit 4960f6defd40de241fa383c77eb104d8514358d7 removed these lines from examples/vars-powervm.yaml.

 setup_registry:
   deploy: false
-  autosync_registry: true
-  registry_image: docker.io/ibmcom/registry-ppc64le:2.6.2.5
-  local_repo: "ocp4/openshift4"
-  product_repo: "openshift-release-dev"
-  release_name: "ocp-release"
-  release_tag: "4.6.5-ppc64le"

When I added them back into my vars-powervm.yaml the error went away.

(FYI: After making the change I ran into a later error /"bin/sh: openshift-install: command not found", but I think this is unrelated.)

cs-zhang commented 3 years ago

I have added them back.