Error while running ansible-playbook on OS 3.1.1

Latest response

After configuring 6 VMs (3 master, 3 node), I am attempting to run the playbook. I'm getting this for each of the master and nodes:

fatal: []: FAILED! => {"msg": "The task includes an option with an undefined variable. The error was: 'ansible.vars.hostvars.HostVarsVars object' has no attribute 'openshift_version'\n\nThe error appears to have been in '/usr/share/ansible/openshift-ansible/playbooks/init/version.yml': line 20, 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  - set_fact:\n    ^ here\n"}

Line 20 seems to be:

  - set_fact:
      openshift_version: "{{ l_first_master_openshift_version }}"
      openshift_pkg_version: "{{ l_first_master_openshift_pkg_version }}"
      openshift_image_tag: "{{ l_first_master_openshift_image_tag }}"

openshift-ansible version seems to be: 3.11.59-1.git.0.ba8e948.el7

Any ideas?



I seem to moved past the initial issue and landed on:

TASK [openshift_node_group : Update the sysconfig to group "node-config-compute"] ***********************
Monday 28 January 2019  10:25:19 -0600 (0:00:00.571)       0:08:31.286 ********
fatal: []: FAILED! => {"changed": false, "msg": "Destination /etc/sysconfig/atomic-openshift-node does not exist !", "rc": 257}

Can you please share the steps which you executed to resolve this issue?

Resolved :)

Yeah - wanna share?

Hi, I am experiencing this issue while performing upgrade to OCP 3.11... What was the cause?

My apologies for the late response, I did not get notifications for some reason. In any case, my issue was caused by ansible version. I had to downgrade to ansible 2.6.12. Hope this helps

I ran into same problem when using ansible 2.6.5. Changing to ansible 2.6.12 didn't help. For me, the fatal error message was a bit misleading. It was actually related to the fact that my master/boot node wasn't configured probably to allow ssh to itself without password

make sure you can go to the individual hosts and successfully run yum -y install <something>. There's a chance that ansible couldn't find the package because yum repo is not available.