Skip to content
This repository has been archived by the owner on Feb 13, 2023. It is now read-only.

AnsibleUndefinedVariable on copy dashboard page into place #1119

Closed
rwohleb opened this issue Jan 12, 2017 · 3 comments
Closed

AnsibleUndefinedVariable on copy dashboard page into place #1119

rwohleb opened this issue Jan 12, 2017 · 3 comments

Comments

@rwohleb
Copy link

rwohleb commented Jan 12, 2017

Issue Type

  • Bug Report / Support Request

Your Environment

Vagrant 1.8.6
VirtualBox 5.1.12r112440
ansible 2.2.0.0
  config file =
  configured module search path = Default w/o overrides

Your OS

  • macOS (10.12.2)

Full console output

https://gist.github.com/rwohleb/5abb678a3da4dc83622c4f3ef7a662b9

Summary

I'm getting "AnsibleUndefinedVariable: list object has no element 1" when trying to freshly provision the VM. This is happening in the dashboard copy task, and I'm guessing it's the use of "ansible_all_ipv4_addresses[1]". Switching this to "ansible_all_ipv4_addresses[0]" appears to solve the problem. Did ansible switch how they index arrays?

@rwohleb
Copy link
Author

rwohleb commented Jan 12, 2017

And... now it seems to work just fine with "ansible_all_ipv4_addresses[1]". Must have been some issue with vagrant-auto_network. Not sure why it would suddenly be ok now.

@rwohleb rwohleb closed this as completed Jan 12, 2017
@cdmo
Copy link
Contributor

cdmo commented Jan 17, 2017

FWIW, I did encounter this too, on a Win7 install with cmder using the latest (3c3dd93) on ansible 2.2. Changing the Dashboard template as per @rwohleb suggestion fixed the problem.

@kjays
Copy link

kjays commented Nov 28, 2017

I also experienced this today on my rebuilt Mac so just installed everything fresh this last week and hit this issue. Changing "ansible_all_ipv4_addresses[1]" to "ansible_all_ipv4_addresses[0]" does fix this.

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

No branches or pull requests

3 participants