Hi

ansible playbook reports an error when one of the value of the yaml config 
file imported as var is passed on the command line using -e

Yaml Config File

#
# Istio
#
istio:
  github_url: https://api.github.com/repos
  repo: istio/istio

  # Could be a tag "0.2.12" version or be empty "", then in this case, the 
latest release will be downloaded
  release_tag_name: "0.2.12"
  
  # Folder where you want to install the distro on your machine. By 
default, we will install it here ~/.istio
  dest: "$HOME/.istio"



Command

ansible-playbook ansible/main.yml --extra-vars "{'istio': 
{'release_tag_name': 0.3.0}}" -t install-istio -v


Result

TASK [Define var containing Istio dir] 
*************************************************************************************************************************************************************************************************************************
fatal: [localhost]: FAILED! => {"failed": true, "msg": "The task includes 
an option with an undefined variable. The error was: 'dict object' has no 
attribute 'dest'\n\nThe error appears to have been in 
'/Users/dabou/Code/istio/installation/ansible/istio/set_istio_distro_dir.yml': 
line 7, column 3, but may\nbe elsewhere in the file depending on the exact 
syntax problem.\n\nThe offending line appears to be:\n\n\n- name: Define 
var containing Istio dir\n  ^ here\n\nexception type: <class 
'ansible.errors.AnsibleUndefinedVariable'>\nexception: 'dict object' has no 
attribute 'dest'"}

So, for a reason that I don't know, ansible is not able to find the 
istio.dest variable

The playbook doesn't report error when no '-e' var is passed to the 
command  !!!!!

What could be the issue ?

Regards

Charles

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ansible-project+unsubscr...@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/a414b4f1-83eb-4861-ab6b-8195e48d228d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to