empty vars files cause openstack-ansible to fail to combine variables

Bug #1597798 reported by Matthew Thode
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack-Ansible
Opinion
Wishlist
Kevin Carter

Bug Description

I'm not sure if this is an ansible problem or one in OSA (how we combine vars files), but I'll report it here.

The file itself looks like this, if you add a defunct variable (not used for anything) it works fine.

---
# licence header
# goes here

and causes this specific error

    openstack-ansible --forks 4 haproxy-install.yml
    Variable files: "-e @/etc/openstack_deploy/user_conf_files.yml -e @/etc/openstack_deploy/user_extras_variables.yml -e @/etc/openstack_deploy/user_osa_aio_variables.yml -e @/etc/openstack_deploy/user_osa_secrets_defaults.yml -e @/etc/openstack_deploy/user_osa_secrets_overrides.yml -e @/etc/openstack_deploy/user_osa_variables_defaults.yml -e @/etc/openstack_deploy/user_osa_variables_overrides.yml -e @/etc/openstack_deploy/user_rpco_secrets_defaults.yml -e @/etc/openstack_deploy/user_rpco_secrets_overrides.yml -e @/etc/openstack_deploy/user_rpco_variables_defaults.yml -e @/etc/openstack_deploy/user_rpco_variables_overrides.yml "
    ERROR: failed to combine variables, expected dicts but got a 'dict' and a 'NoneType'

Revision history for this message
Matthew Thode (prometheanfire) wrote :

The reason we wish to have an empty vars file is to ship it to our end users so they override the vars that we ship. They can't edit the files we ship directly because we may overwrite them (causing them to loose their overrides).

Revision history for this message
Jean-Philippe Evrard (jean-philippe-evrard) wrote :

That's ansible default behavior.

We could maybe check in the dynamic inventory before including as a workaround, but this is not the way we are working now.

Changed in openstack-ansible:
importance: Undecided → Wishlist
status: New → Opinion
assignee: nobody → Kevin Carter (kevin-carter)
Revision history for this message
Jean-Philippe Evrard (jean-philippe-evrard) wrote :
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.