On 20. jan. 2017 21:32, Elliott Barrere wrote:
My hunch is that you directory structure is not correct so Ansible can't
find the files.
Yeah, that's what I was thinking too, but unless that changed between
versions I don't know why it would suddenly stop working.
So this did work at some point?
If so did it stop after you upgraded, if thats the case does it work if
you downgrade to the last working version?
In the same directory as you inventory file, output of these commands
would help track it down.
tree -L 3
$ tree -L 3
.
├── ansible.cfg
├── group_vars
├── host_vars
├── inventory
│ ├── centos_templates
│ ├── production
│ │ ├── generated
│ │ └── production
│ ├── test
│ ├── vagrant
│ └── workstations
├── playbooks
│ ├── linux
│ │ ├── linux_ansible_control_machine.yaml
│ │ ├── linux_ftp.yaml
│ │ ├── linux_jump.yaml
│ │ ├── linux_nameservers.yaml
│ │ ├── linux_os_hardening.yaml
│ │ ├── linux_pbis.retry
│ │ ├── linux_pbis.yaml
│ │ ├── linux.retry
│ │ ├── linux_set_root_password.yaml
│ │ ├── linux_utility.yaml
│ │ ├── linux_webservers.yaml
│ │ ├── linux.yaml
│ │ └── templates
│ ├── testing
│ │ ├── dumpall.j2
│ │ ├── dump_vars.yaml
│ │ └── vagrant.yaml
│ ├── win
│ │ └── win_servers.yaml
│ └── workstations
│ └── win_workstations.yaml
├── site.yaml
I think I see what could be a problem.
I guess you are running ansible-playbook from the directory ansible.cfg
is in, and running someting like this?
ansible-playbook -i inventory/<sonething> playbooks/linux/linux.yaml
The reason I ask is that host_vars and group_vars must be in the same
directory as the inventory or playbooks[1]
And here they are on the top level, so only site.yml is able to use
host_vars and group_vars in your layout.
If you move the playbook you have problem with to the same level as
site.yml, does it work?
$ ansible --version
ansible 2.3.0 (devel 92a568c816) last updated 2017/01/20 13:14:32 (GMT -600)
config file =
configured module search path = Default w/o overrides
Did you run this the the ansible directory, it should have displayed the
path to ansible.cfg in "config file", but yours is empty.
[1]
https://docs.ansible.com/ansible/intro_inventory.html#splitting-out-host-and-group-specific-data
--
Kai Stian Olstad
--
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/2afaf138-0a91-ab7b-9d36-315ae8da7c76%40olstad.com.
For more options, visit https://groups.google.com/d/optout.