Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AnsibleUndefinedVariable: 'cloud_config_used' is undefined #1616

Closed
elenagerman opened this issue Feb 18, 2020 · 3 comments
Closed

AnsibleUndefinedVariable: 'cloud_config_used' is undefined #1616

elenagerman opened this issue Feb 18, 2020 · 3 comments
Assignees
Labels
Milestone

Comments

@elenagerman
Copy link

linchpin --template-data @extravars.yaml -v up libvirt-network libvirt-new cfgs

11:20:35  TASK [libvirt : define node template] ******************************************
11:20:35  failed: [localhost] (item=[{'name_separator': '-', 'cpu_mode': 'host-passthrough', 'count': 3, 'uri': 'qemu:///system', 'driver': 'kvm', 'arch': 'x86_64', 'remote_user': 'root', 'boot_dev': 'hd', 'additional_storage': '42G', 'disk_cache': 'unsafe', 'disk_type': 'virtio_scsi', 'network_bridge': '', 'ssh_key': 'id_rsa', 'cloud_config': {'virt_type': 'cloud-init', 'users': [{'name': 'kni', 'gecos': 'Admin User', 'groups': 'wheel', 'sudo': 'ALL=(ALL) NOPASSWD:ALL', 'lock_passwd': False}], 'run_commands': []}, 'networks': [{'name': 'baremetal'}, {'name': 'provisioning', 'dhcp': False}], 'storage': [], 'domain': 'example.com', 'role': 'libvirt_node', 'name': 'master', 'image_src': 'http://download.devel.redhat.com/brewroot/packages/rhel-guest-image/8.1/283/images/rhel-guest-image-8.1-283.x86_64.qcow2', 'memory': 32768, 'vcpus': 16}, 0, '/var/lib/libvirt/images/linchpin/', 'qcow2', '-', 'unsafe', 'host-passthrough', 'virtio_scsi']) => {"ansible_loop_var": "definition", "changed": false, "definition": [{"additional_storage": "42G", "arch": "x86_64", "boot_dev": "hd", "cloud_config": {"run_commands": [], "users": [{"gecos": "Admin User", "groups": "wheel", "lock_passwd": false, "name": "kni", "sudo": "ALL=(ALL) NOPASSWD:ALL"}], "virt_type": "cloud-init"}, "count": 3, "cpu_mode": "host-passthrough", "disk_cache": "unsafe", "disk_type": "virtio_scsi", "domain": "example.com", "driver": "kvm", "image_src": "http://download.devel.redhat.com/brewroot/packages/rhel-guest-image/8.1/283/images/rhel-guest-image-8.1-283.x86_64.qcow2", "memory": 32768, "name": "master", "name_separator": "-", "network_bridge": "", "networks": [{"name": "baremetal"}, {"dhcp": false, "name": "provisioning"}], "remote_user": "root", "role": "libvirt_node", "ssh_key": "id_rsa", "storage": [], "uri": "qemu:///system", "vcpus": 16}, 0, "/var/lib/libvirt/images/linchpin/", "qcow2", "-", "unsafe", "host-passthrough", "virtio_scsi"], "msg": "AnsibleUndefinedVariable: 'cloud_config_used' is undefined"}
11:20:35  failed: [localhost] (item=[{'name_separator': '-', 'cpu_mode': 'host-passthrough', 'count': 3, 'uri': 'qemu:///system', 'driver': 'kvm', 'arch': 'x86_64', 'remote_user': 'root', 'boot_dev': 'hd', 'additional_storage': '42G', 'disk_cache': 'unsafe', 'disk_type': 'virtio_scsi', 'network_bridge': '', 'ssh_key': 'id_rsa', 'cloud_config': {'virt_type': 'cloud-init', 'users': [{'name': 'kni', 'gecos': 'Admin User', 'groups': 'wheel', 'sudo': 'ALL=(ALL) NOPASSWD:ALL', 'lock_passwd': False}], 'run_commands': []}, 'networks': [{'name': 'baremetal'}, {'name': 'provisioning', 'dhcp': False}], 'storage': [], 'domain': 'example.com', 'role': 'libvirt_node', 'name': 'master', 'image_src': 'http://download.devel.redhat.com/brewroot/packages/rhel-guest-image/8.1/283/images/rhel-guest-image-8.1-283.x86_64.qcow2', 'memory': 32768, 'vcpus': 16}, 1, '/var/lib/libvirt/images/linchpin/', 'qcow2', '-', 'unsafe', 'host-passthrough', 'virtio_scsi']) => {"ansible_loop_var": "definition", "changed": false, "definition": [{"additional_storage": "42G", "arch": "x86_64", "boot_dev": "hd", "cloud_config": {"run_commands": [], "users": [{"gecos": "Admin User", "groups": "wheel", "lock_passwd": false, "name": "kni", "sudo": "ALL=(ALL) NOPASSWD:ALL"}], "virt_type": "cloud-init"}, "count": 3, "cpu_mode": "host-passthrough", "disk_cache": "unsafe", "disk_type": "virtio_scsi", "domain": "example.com", "driver": "kvm", "image_src": "http://download.devel.redhat.com/brewroot/packages/rhel-guest-image/8.1/283/images/rhel-guest-image-8.1-283.x86_64.qcow2", "memory": 32768, "name": "master", "name_separator": "-", "network_bridge": "", "networks": [{"name": "baremetal"}, {"dhcp": false, "name": "provisioning"}], "remote_user": "root", "role": "libvirt_node", "ssh_key": "id_rsa", "storage": [], "uri": "qemu:///system", "vcpus": 16}, 1, "/var/lib/libvirt/images/linchpin/", "qcow2", "-", "unsafe", "host-passthrough", "virtio_scsi"], "msg": "AnsibleUndefinedVariable: 'cloud_config_used' is undefined"}

To Reproduce
Steps to reproduce the behavior:

  1. Install linchpin==1.10.0'
  2. linchpin --template-data @extravars.yaml -v up libvirt-network libvirt-new cfgs

Expected behavior
Node template should be defined successfully

Desktop (please complete the following information):

  • OS: Red Hat Enterprise Linux release 8.1 (Ootpa)
  • Version 1.10.0
@samvarankashyap
Copy link
Contributor

#1597 fixes the above error on the develop branch.

@samvarankashyap samvarankashyap added this to the v2.0.0 milestone Feb 18, 2020
@14rcole
Copy link
Contributor

14rcole commented Feb 19, 2020

#1620 fixes this

@Dannyb48
Copy link
Contributor

Curious is there test coverage in place for using cloud_config param in any of the libvirt tests?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants