From 7cf16588e8fa16c7a586b8d33dbd0ad733ccb076 Mon Sep 17 00:00:00 2001 From: Brian Coca Date: Wed, 15 Mar 2017 11:53:52 -0400 Subject: [PATCH] draft playbook path docs --- docs/docsite/rst/playbook_pahting.rst | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 docs/docsite/rst/playbook_pahting.rst diff --git a/docs/docsite/rst/playbook_pahting.rst b/docs/docsite/rst/playbook_pahting.rst new file mode 100644 index 00000000000..fe1add727fe --- /dev/null +++ b/docs/docsite/rst/playbook_pahting.rst @@ -0,0 +1,11 @@ +relative paths get attempted first with a 'files|templates|vars' in path (if not already present) depending on action being taken, 'files' is the default. (i.e include_vars will use vars/). +paths will be searched from most specific to most general (i.e role before play). +dependent roles WILL be traversed (i.e task is in role2, role2 is a dependency of role1, role2 will be looked at first, then role1, then play). +role search path is rolename/{files|vars|templates}/, rolename/tasks/. +play search path is playdir/{files|vars|templates}/, playdir/. +the current working directory (cwd) is not searched. If you see it, it just happens to coincide with one of the paths above. +include of a task file from a role will NOT trigger role behavior, this only happens when running as a role. +new ansible_search_path var will have the search path used, in order. +5 vs (-vvvvv) should show the detail of the search as it happens. +this does NOT affect absolute paths +includes try the path of the included file first and fall back to the play/role that includes them.