#197 Calling ansible_python_interpreter instead of ansible_python
Closed 3 years ago by mohanboddu. Opened 3 years ago by mohanboddu.
fedora-infra/ mohanboddu/ansible ansible_python_interpreter  into  master

@@ -5,7 +5,7 @@ 

  

  - name: get vm list

    vars:

-     ansible_python_interpreter: "{{ hostvars[vmhost]['ansible_python']['executable'] }}"

+     ansible_python_interpreter: "{{ hostvars[vmhost]['ansible_python_interpreter']['executable'] }}"

    delegate_to: "{{ vmhost }}"

    virt: command=list_vms

    register: result

I have no idea what I am doing here, I am trying to fix:

fatal: [bodhi-backend01.iad2.fedoraproject.org]: FAILED! => {
    "msg": "'ansible.vars.hostvars.HostVarsVars object' has no attribute 'ansible_python'"
}

As its happening with other playbooks and hosts as well.

This is caused I think by the virthost vars dropping out of the cache and needing to be re-added.

I did so and it works again for me.

This is caused I think by the virthost vars dropping out of the cache and needing to be re-added.

I did so and it works again for me.

Its fixed and no need to merge this PR.

Thanks.

Pull-Request has been closed by mohanboddu

3 years ago