[PATCH 2/2] gen_hosts: remove 'write-your-own-template' placeholder text
Luis Chamberlain <[email protected]>
| Newsgroups | dev.linux.lists.kdevops |
|---|---|
| Message-ID | <[email protected]> |
During patch review, it was noted that the placeholder text
'write-your-own-template-for-...-workflow' was introduced in commit
71f085a4d77f ("kdevops: replace ansible hosts generation jinja2
templating") from kdevops-history and has been expanded to other
templates.
This placeholder text serves no functional purpose and should be
replaced with proper template structure. The cxl.j2 and pynfs.j2
workflow templates contained these placeholders which have now been
replaced with proper host definitions following the pattern used
by other workflow templates.
The templates now properly define:
- The workflow host in [all] section
- A [baseline] group with the workflow host
- A workflow-specific group ([cxl] or [pynfs]) with the host
- Proper ansible_python_interpreter variables for each group
This cleanup ensures consistency across all workflow templates.
Suggested-by: Daniel Gomez <[email protected]>
Fixes: 40df5ef72d197 ("gen_hosts: use kdevops_workflow_name directly for template selection")
Signed-off-by: Luis Chamberlain <[email protected]>
---
.../roles/gen_hosts/templates/workflows/cxl.j2 | 14 +++++++++++++-
.../roles/gen_hosts/templates/workflows/pynfs.j2 | 14 +++++++++++++-
2 files changed, 26 insertions(+), 2 deletions(-)
diff --git a/playbooks/roles/gen_hosts/templates/workflows/cxl.j2 b/playbooks/roles/gen_hosts/templates/workflows/cxl.j2
index 53790f29..cf1e7083 100644
--- a/playbooks/roles/gen_hosts/templates/workflows/cxl.j2
+++ b/playbooks/roles/gen_hosts/templates/workflows/cxl.j2
@@ -1,7 +1,19 @@
{# Workflow template for CXL #}
[all]
localhost ansible_connection=local
-write-your-own-template-for-cxl-workflow
+{{ kdevops_host_prefix }}-cxl
[all:vars]
ansible_python_interpreter = "{{ kdevops_python_interpreter }}"
+
+[baseline]
+{{ kdevops_host_prefix }}-cxl
+
+[baseline:vars]
+ansible_python_interpreter = "{{ kdevops_python_interpreter }}"
+
+[cxl]
+{{ kdevops_host_prefix }}-cxl
+
+[cxl:vars]
+ansible_python_interpreter = "{{ kdevops_python_interpreter }}"
diff --git a/playbooks/roles/gen_hosts/templates/workflows/pynfs.j2 b/playbooks/roles/gen_hosts/templates/workflows/pynfs.j2
index 6145b1a0..a93b8f06 100644
--- a/playbooks/roles/gen_hosts/templates/workflows/pynfs.j2
+++ b/playbooks/roles/gen_hosts/templates/workflows/pynfs.j2
@@ -1,7 +1,19 @@
{# Workflow template for pynfs #}
[all]
localhost ansible_connection=local
-write-your-own-template-for-pynfs-workflow
+{{ kdevops_host_prefix }}-pynfs
[all:vars]
ansible_python_interpreter = "{{ kdevops_python_interpreter }}"
+
+[baseline]
+{{ kdevops_host_prefix }}-pynfs
+
+[baseline:vars]
+ansible_python_interpreter = "{{ kdevops_python_interpreter }}"
+
+[pynfs]
+{{ kdevops_host_prefix }}-pynfs
+
+[pynfs:vars]
+ansible_python_interpreter = "{{ kdevops_python_interpreter }}"
--
2.50.1