ValueError: need more than 1 value to unpack

263 views
Skip to first unread message

Andres Silva

unread,
Apr 28, 2015, 1:22:41 PM4/28/15
to ansible...@googlegroups.com
With Ansible 1.9 I have the following plays (fails only with 1.9 with 1.8 it works fine)

- name: Set to Java version specified by role parameter
  set_fact:
    ver: "{{ java_version }}"
  when: ver is undefined

- alternatives: name=jar link=/usr/bin/jar path=/usr/java/jdk{{ ver }}/bin/jar

And I get this error

failed: [default] => {"failed": true, "parsed": false}
BECOME-SUCCESS-yqvfbismgrplhjzyedwtepsqchisywud
Traceback (most recent call last):
  File "/home/ec2-user/.ansible/tmp/ansible-tmp-1430241476.96-220752392480644/alternatives", line 1756, in <module>
    main()
  File "/home/ec2-user/.ansible/tmp/ansible-tmp-1430241476.96-220752392480644/alternatives", line 126, in main
    line_name, line_mode, line_path = line.strip().split("\t")
ValueError: need more than 1 value to unpack
OpenSSH_6.2p2, OSSLShim 0.9.8r 8 Dec 2011
debug1: Reading configuration data /Users/asilva/.ssh/config
debug1: /Users/asilva/.ssh/config line 53: Applying options for 172.18.15.*
debug1: Reading configuration data /etc/ssh_config
debug1: /etc/ssh_config line 20: Applying options for *
debug1: /etc/ssh_config line 102: Applying options for *
debug1: auto-mux: Trying existing master
debug1: mux_client_request_session: master session id: 2
Shared connection to 172.18.15.120 closed.


FATAL: all hosts have already failed -- aborting


This works fine with 1.8. But breaks in 1.9 - Any ideas?

Brian Coca

unread,
Apr 28, 2015, 3:28:14 PM4/28/15
to ansible...@googlegroups.com
what is the value of 'ver'? you might need to quote path="..."

--
Brian Coca
Reply all
Reply to author
Forward
0 new messages