Apparently ansible-playbook is a symlink on this system; I had 
/usr/bin/ansible owned by the group ansible before but I changed it back to 
root for testing & got so result.  What is more weird is that if 
ansible-playbook is just a symlink why is the behavior different?

root@ip-172-17-0-237:/etc/ansible# ansible --version
ansible 2.1.0.0
  config file = /etc/ansible/ansible.cfg
  configured module search path = Default w/o overrides

root@ip-172-17-0-237:/etc/ansible# ansible-playbook --version
ansible-playbook 2.1.0.0
  config file = /etc/ansible/ansible.cfg
  configured module search path = Default w/o overrides


root@ip-172-17-0-237:/etc/ansible# ll /usr/bin/ansible
-rwxr-xr-x 1 root ansible 4201 May 25 13:03 /usr/bin/ansible*

root@ip-172-17-0-237:/etc/ansible# ll /usr/bin/ansible-playbook
lrwxrwxrwx 1 root root 7 May 25 13:03 /usr/bin/ansible-playbook -> ansible*

I checked on another older version and ansible-playbook is a script:

 ✘ antho@stratus  ~/.ssh  which ansible
/usr/bin/ansible
 antho@stratus  ~/.ssh  which ansible-playbook
/usr/bin/ansible-playbook
 antho@stratus  ~/.ssh  ll /usr/bin/ansible-playbook
-rwxr-xr-x+ 1 antho antho 3.9K May 22 23:18 /usr/bin/ansible-playbook
 antho@stratus  ~/.ssh  ansible --version
ansible 2.0.2.0
  config file = /etc/ansible/ansible.cfg
  configured module search path = Default w/o overrides
 antho@stratus  ~/.ssh  ansible-playbook --version
ansible-playbook 2.0.2.0
  config file = /etc/ansible/ansible.cfg
  configured module search path = Default w/o overrides

btw here's the playbook i used for testing; nothing fancy:

ot@ip-172-17-0-237:/etc/ansible# cat testing/test_var.yml
---
- hosts: localhost
  gather_facts: no

  vars:
     user: "{{ lookup('file', '/etc/ansible/testing/vars.yml') }}"

  tasks:

     - debug: msg="the value of foo.txt is {{ user }}"





On Thursday, July 7, 2016 at 3:38:05 PM UTC-4, Dick Davies wrote:
>
> That sounds really - odd. 
>
> It sounds silly, but are you _sure_ ansible and ansible-playbook are 
> at the same version? 
>
> ansible --version 
> ansible-playbook --version 
>
> Maybe there's some symlink spaghetti going on or something?? 
>
> If not, that sounds like a bug, I'd file an issue. 
>
> On 7 July 2016 at 20:08, Anthony Cheng <[email protected] 
> <javascript:>> wrote: 
> > To be more specific, ad-hoc command checks in ~/.ssh/authorized key 
> whereas 
> > playbook does not.  I didn't specific any user in the playbook whereas I 
> try 
> > to run as root/ubuntu/none with ad-hoc (-u). 
> > 
> > -- 
> > 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 [email protected] <javascript:>. 
> > To post to this group, send email to [email protected] 
> <javascript:>. 
> > To view this discussion on the web visit 
> > 
> https://groups.google.com/d/msgid/ansible-project/98c0c14f-549c-4f76-9475-ee0c5ef71406%40googlegroups.com.
>  
>
> > 
> > For more options, visit https://groups.google.com/d/optout. 
>

-- 
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 [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/9c17c71f-ed8b-485e-9d25-34df7fa54d9b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to