diff options
Diffstat (limited to 'examples/roles/include_relative')
-rw-r--r-- | examples/roles/include_relative/tasks/included_file.yml | 4 | ||||
-rw-r--r-- | examples/roles/include_relative/tasks/main.yml | 7 |
2 files changed, 11 insertions, 0 deletions
diff --git a/examples/roles/include_relative/tasks/included_file.yml b/examples/roles/include_relative/tasks/included_file.yml new file mode 100644 index 0000000..ef81833 --- /dev/null +++ b/examples/roles/include_relative/tasks/included_file.yml @@ -0,0 +1,4 @@ +--- +- name: included_file | Sample debug task + ansible.builtin.debug: + msg: "was found & included" diff --git a/examples/roles/include_relative/tasks/main.yml b/examples/roles/include_relative/tasks/main.yml new file mode 100644 index 0000000..de69255 --- /dev/null +++ b/examples/roles/include_relative/tasks/main.yml @@ -0,0 +1,7 @@ +--- +# ansible allow paths relative to role directory +- name: 1st include + ansible.builtin.include_tasks: tasks/included_file.yml +# relative to the current file, same effect as previous line +- name: 2nd include + ansible.builtin.include_tasks: included_file.yml |