host_vars mystery

32 views
Skip to first unread message

Bill Carlson

unread,
Nov 17, 2016, 11:14:53 AM11/17/16
to Ansible Project
Hello,

Have an odd problem with host_vars, work different on two systems.
Using 2.1.2.0, Centos 6 on both.

On problem system, a run with only one host from inventory is failing to pickup host_vars for other hosts, while groups_vars are correct.
If, on same system, run with all hosts shows the expected value, confirmed via '-debug: vars=hostvars'.

On another system, same setup, same user, same repo of playbook, same commit, run with single host shows the correct host_vars for all hosts.

I've broken down to simple playbook file:

---
- hosts: host1
  tasks:
    -debug: var=hostvars



Same result.


This does use cache with this config file in playbook (so, global is not changed):


[defaults]

remote_user=root

ansible_managed=Managed by ansible, hand edits will be overwritten.

forks=10

timeout=30

#deprecation_warnings=False

#gathering=smart

fact_caching=jsonfile

fact_caching_timeout=3600

fact_caching_connection=.cache/

scp_if_ssh=true

 

[ssh_connection]

pipelining=true

ssh_args= -o GSSAPIAuthentication=no -o ServerAliveInterval=180



I tried both --flush-cache and nuking .cache, no change.

What am I missing?


Bill

Bill Carlson

unread,
Nov 21, 2016, 11:02:35 AM11/21/16
to Ansible Project
I finally reverted to ansible version 2.1.0.0, with this the run completed as expected.
Reply all
Reply to author
Forward
0 new messages