V2 default values not picked up?

58 views
Skip to first unread message

Mikael Sandström

unread,
Jan 13, 2016, 5:11:20 AM1/13/16
to Ansible Project
Hi,

I upgraded to 2.0.0.1 (from 1.9.4) this morning and ran one of my playbooks to see if things worked and it lit up like a christmas tree. Most of that was just warnings (and the fact that ansible_ssh_port is not called that any more...), but this thing seems a little more serious (unless I'm missing something)

This is on Fedora 23

This works in 1.9.4:

- hosts: localhost
  connection
: local
  gather_facts
: false


  tasks
:


 
- name: debug
    debug
: msg={{ansible_port|default(22)}}



PLAY [localhost] **************************************************************


TASK
: [debug] *****************************************************************
ok
: [localhost] => {
   
"msg": "22"
}



But doesnt work in 2.0.0.1. Its like the default filter is ignored.

TASK [debug] *******************************************************************
ok
: [localhost] => {
   
"msg": ""
}


Any ideas?

James Cammarata

unread,
Jan 13, 2016, 10:15:44 AM1/13/16
to ansible...@googlegroups.com
That's odd, ansible_ssh_port is still used, it's just an alias to ansible_port now.

The issue above may be the result of us not adding in all internal variables to the variable dictionary, so go ahead and open an issue for this on github (or search to see if someone else has run into this).

James Cammarata
Director, Ansible Core Engineering
github: jimi-c

--
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-proje...@googlegroups.com.
To post to this group, send email to ansible...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/53a65287-421a-4bd0-8456-bb8424983944%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages