diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-13 12:06:49 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-13 12:06:49 +0000 |
commit | 2fe34b6444502079dc0b84365ce82dbc92de308e (patch) | |
tree | 8fedcab52bbbc3db6c5aa909a88a7a7b81685018 /examples/roles/var_naming_pattern/tasks | |
parent | Initial commit. (diff) | |
download | ansible-lint-2fe34b6444502079dc0b84365ce82dbc92de308e.tar.xz ansible-lint-2fe34b6444502079dc0b84365ce82dbc92de308e.zip |
Adding upstream version 6.17.2.upstream/6.17.2
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'examples/roles/var_naming_pattern/tasks')
3 files changed, 22 insertions, 0 deletions
diff --git a/examples/roles/var_naming_pattern/tasks/cacheable_set_fact.yml b/examples/roles/var_naming_pattern/tasks/cacheable_set_fact.yml new file mode 100644 index 0000000..23113eb --- /dev/null +++ b/examples/roles/var_naming_pattern/tasks/cacheable_set_fact.yml @@ -0,0 +1,5 @@ +--- +- name: cacheable_set_fact | Using set_fact with cacheable + ansible.builtin.set_fact: + var_naming_pattern_fact: bar + cacheable: true diff --git a/examples/roles/var_naming_pattern/tasks/include_task_with_vars.yml b/examples/roles/var_naming_pattern/tasks/include_task_with_vars.yml new file mode 100644 index 0000000..5151cd3 --- /dev/null +++ b/examples/roles/var_naming_pattern/tasks/include_task_with_vars.yml @@ -0,0 +1,13 @@ +--- +- name: include_task_with_vars | Foo + ansible.builtin.include_tasks: ../tasks/included-task-with-vars.yml + vars: + var_naming_pattern_foo: bar + +- name: include_task_with_vars | Foo + ansible.builtin.include_role: + name: bobbins + vars: + bobbins_foo: bar + # ^ this is valid because for include/import, the prefix should be of the + # included role and from of the current role. diff --git a/examples/roles/var_naming_pattern/tasks/main.yml b/examples/roles/var_naming_pattern/tasks/main.yml new file mode 100644 index 0000000..896a7f2 --- /dev/null +++ b/examples/roles/var_naming_pattern/tasks/main.yml @@ -0,0 +1,4 @@ +--- +- name: Foobar + ansible.builtin.set_fact: + var_naming_pattern__namespace: "foo" |