[PATCH 2/4] workflows: fix inconsistent ansible-playbook patterns and invalid host groups

Daniel Gomez <[email protected]>
Newsgroups dev.linux.lists.kdevops
Message-ID <[email protected]>
From: Daniel Gomez <[email protected]>

Multiple issues were introduced in commit 7f25db722:

1. Workflow Makefiles using "-i hosts" explicitly instead of relying on
   ansible.cfg inventory configuration
2. AI and minio workflows incorrectly using custom host groups "ai" and
   "minio" instead of standard kdevops host groups
3. Redundant "-f" fork parameters when ansible.cfg already configures forks

The only valid host groups in kdevops are: all, baseline, dev, and service.
Custom workflow-specific host groups violate the established architecture.

This removes invalid groups, the -i/--inventory arguments, -f/--forks
parameters + leverages the ansible.cfg configuration.

Fixes: 7f25db722 ("bootlinux: add support for A/B testing different kernel refs")

Generated-by: Claude AI
Signed-off-by: Luis Chamberlain <[email protected]>
---
 playbooks/ai_benchmark.yml |  2 +-
 playbooks/ai_destroy.yml   |  2 +-
 playbooks/ai_install.yml   |  2 +-
 playbooks/ai_results.yml   |  2 +-
 playbooks/ai_setup.yml     |  2 +-
 playbooks/ai_tests.yml     |  6 +++---
 playbooks/ai_uninstall.yml |  2 +-
 playbooks/minio.yml        | 10 +++++-----
 workflows/ai/Makefile      | 14 --------------
 workflows/minio/Makefile   |  8 ++++----
 10 files changed, 18 insertions(+), 32 deletions(-)

diff --git a/playbooks/ai_benchmark.yml b/playbooks/ai_benchmark.yml
index 85fc117c..5ce45fdc 100644
--- a/playbooks/ai_benchmark.yml
+++ b/playbooks/ai_benchmark.yml
@@ -1,6 +1,6 @@
 ---
 - name: Run Milvus Vector Database Benchmarks
-  hosts: ai
+  hosts: baseline:dev
   vars:
     ai_vector_db_milvus_benchmark_enable: true
   roles:
diff --git a/playbooks/ai_destroy.yml b/playbooks/ai_destroy.yml
index eef07b2a..ba1a31b5 100644
--- a/playbooks/ai_destroy.yml
+++ b/playbooks/ai_destroy.yml
@@ -1,6 +1,6 @@
 ---
 - name: Destroy Milvus Vector Database
-  hosts: ai
+  hosts: baseline:dev
   become: true
   tasks:
     - name: Stop Milvus containers
diff --git a/playbooks/ai_install.yml b/playbooks/ai_install.yml
index 38e6671c..1cc2f6c2 100644
--- a/playbooks/ai_install.yml
+++ b/playbooks/ai_install.yml
@@ -1,6 +1,6 @@
 ---
 - name: Install Milvus Vector Database
-  hosts: ai
+  hosts: baseline:dev
   become: true
   become_user: root
   roles:
diff --git a/playbooks/ai_results.yml b/playbooks/ai_results.yml
index 881295eb..64216d61 100644
--- a/playbooks/ai_results.yml
+++ b/playbooks/ai_results.yml
@@ -1,6 +1,6 @@
 ---
 - name: Collect and analyze AI benchmark results
-  hosts: ai
+  hosts: baseline:dev
   roles:
     - ai_collect_results
   tags: ['ai', 'ai_results']
diff --git a/playbooks/ai_setup.yml b/playbooks/ai_setup.yml
index f0007ee2..eceda156 100644
--- a/playbooks/ai_setup.yml
+++ b/playbooks/ai_setup.yml
@@ -1,6 +1,6 @@
 ---
 - name: Setup AI benchmark environment
-  hosts: ai
+  hosts: baseline:dev
   roles:
     - ai_setup
   tags: ['ai', 'ai_setup']
diff --git a/playbooks/ai_tests.yml b/playbooks/ai_tests.yml
index 1a5638fc..728196bd 100644
--- a/playbooks/ai_tests.yml
+++ b/playbooks/ai_tests.yml
@@ -3,7 +3,7 @@
 # This ensures AI infrastructure is setup before running benchmarks
 
 - name: AI Tests - Ensure Milvus is installed
-  hosts: ai
+  hosts: baseline:dev
   become: true
   become_user: root
   roles:
@@ -12,7 +12,7 @@
       tags: ['ai', 'milvus', 'setup']
 
 - name: AI Tests - Vector Database Benchmarks
-  hosts: ai
+  hosts: baseline:dev
   become: true
   vars:
     # Skip infrastructure setup when running tests
@@ -23,7 +23,7 @@
       tags: ['ai', 'benchmark']
 
 - name: AI Tests - Results Collection
-  hosts: ai
+  hosts: baseline:dev
   become: true
   roles:
     - role: ai_collect_results
diff --git a/playbooks/ai_uninstall.yml b/playbooks/ai_uninstall.yml
index fb537664..3894ef05 100644
--- a/playbooks/ai_uninstall.yml
+++ b/playbooks/ai_uninstall.yml
@@ -1,6 +1,6 @@
 ---
 - name: Uninstall AI benchmark components
-  hosts: ai
+  hosts: baseline:dev
   roles:
     - ai_uninstall
   tags: ['ai', 'ai_uninstall']
diff --git a/playbooks/minio.yml b/playbooks/minio.yml
index bf80bbf4..2855a8fe 100644
--- a/playbooks/minio.yml
+++ b/playbooks/minio.yml
@@ -2,7 +2,7 @@
 # MinIO S3 Storage Benchmarking Playbook
 
 - name: Install MinIO and setup
-  hosts: minio
+  hosts: baseline:dev
   become: true
   become_user: root
   tags: ['minio_install']
@@ -21,7 +21,7 @@
         minio_docker_network: "{{ minio_docker_network_name }}"
 
 - name: Run MinIO Warp benchmarks
-  hosts: minio
+  hosts: baseline:dev
   become: true
   become_user: root
   tags: ['minio_warp']
@@ -29,7 +29,7 @@
     - role: minio_warp_run
 
 - name: Uninstall MinIO
-  hosts: minio
+  hosts: baseline:dev
   become: true
   become_user: root
   tags: ['minio_uninstall']
@@ -37,7 +37,7 @@
     - role: minio_uninstall
 
 - name: Destroy MinIO and cleanup
-  hosts: minio
+  hosts: baseline:dev
   become: true
   become_user: root
   tags: ['minio_destroy']
@@ -45,7 +45,7 @@
     - role: minio_destroy
 
 - name: Analyze MinIO results
-  hosts: minio
+  hosts: baseline:dev
   become: true
   become_user: root
   tags: ['minio_results']
diff --git a/workflows/ai/Makefile b/workflows/ai/Makefile
index 7e9b8af2..62731bae 100644
--- a/workflows/ai/Makefile
+++ b/workflows/ai/Makefile
@@ -31,9 +31,7 @@ export AI_ARGS_SEPARATED := $(subst $(space),$(comma),$(AI_ARGS))
 # Main AI workflow targets
 ai: $(KDEVOPS_NODES) $(ANSIBLE_INVENTORY_FILE)
 	$(Q)ansible-playbook $(ANSIBLE_VERBOSE) \
-		-i hosts \
 		playbooks/ai.yml \
-		-f 10 \
 		--extra-vars=@$(KDEVOPS_EXTRA_VARS) \
 		--extra-vars="$(AI_ARGS) $(AI_MANUAL_ARGS)" \
 		$(LIMIT_HOSTS)
@@ -47,9 +45,7 @@ ai-dev:
 # AI Testing/Benchmark targets
 ai-tests: $(KDEVOPS_NODES) $(ANSIBLE_INVENTORY_FILE)
 	$(Q)ansible-playbook $(ANSIBLE_VERBOSE) \
-		-i hosts \
 		playbooks/ai_tests.yml \
-		-f 10 \
 		--extra-vars=@$(KDEVOPS_EXTRA_VARS) \
 		--extra-vars="$(AI_ARGS) $(AI_MANUAL_ARGS)" \
 		$(LIMIT_HOSTS)
@@ -58,9 +54,7 @@ ai-tests: $(KDEVOPS_NODES) $(ANSIBLE_INVENTORY_FILE)
 ai-tests-baseline: $(KDEVOPS_NODES) $(ANSIBLE_INVENTORY_FILE)
 	$(Q)ansible-playbook $(ANSIBLE_VERBOSE) \
 		-l baseline \
-		-i hosts \
 		playbooks/ai_tests.yml \
-		-f 10 \
 		--extra-vars=@$(KDEVOPS_EXTRA_VARS) \
 		--extra-vars="$(AI_ARGS) $(AI_MANUAL_ARGS)"
 	$(Q)$(MAKE) ai-results-baseline
@@ -68,9 +62,7 @@ ai-tests-baseline: $(KDEVOPS_NODES) $(ANSIBLE_INVENTORY_FILE)
 ai-tests-dev: $(KDEVOPS_NODES) $(ANSIBLE_INVENTORY_FILE)
 	$(Q)ansible-playbook $(ANSIBLE_VERBOSE) \
 		-l dev \
-		-i hosts \
 		playbooks/ai_tests.yml \
-		-f 10 \
 		--extra-vars=@$(KDEVOPS_EXTRA_VARS) \
 		--extra-vars="$(AI_ARGS) $(AI_MANUAL_ARGS)"
 	$(Q)$(MAKE) ai-results-dev
@@ -78,9 +70,7 @@ ai-tests-dev: $(KDEVOPS_NODES) $(ANSIBLE_INVENTORY_FILE)
 # Target to only run results analysis and graph generation
 ai-tests-results:
 	$(Q)ansible-playbook $(ANSIBLE_VERBOSE) \
-		-i hosts \
 		playbooks/ai_tests.yml \
-		-f 10 \
 		--extra-vars=@$(KDEVOPS_EXTRA_VARS) \
 		--extra-vars="$(AI_ARGS) $(AI_MANUAL_ARGS)" \
 		--tags="results" \
@@ -89,7 +79,6 @@ ai-tests-results:
 # Results collection targets
 ai-results:
 	$(Q)ansible-playbook $(ANSIBLE_VERBOSE) \
-		-i hosts \
 		playbooks/ai_results.yml \
 		--extra-vars=@$(KDEVOPS_EXTRA_VARS) \
 		--extra-vars="$(AI_ARGS) $(AI_MANUAL_ARGS)" \
@@ -103,7 +92,6 @@ ai-results-dev:
 
 ai-setup:
 	$(Q)ansible-playbook $(ANSIBLE_VERBOSE) \
-		-i hosts \
 		playbooks/ai_setup.yml \
 		--extra-vars=@$(KDEVOPS_EXTRA_VARS) \
 		--extra-vars="$(AI_ARGS) $(AI_MANUAL_ARGS)" \
@@ -111,7 +99,6 @@ ai-setup:
 
 ai-uninstall:
 	$(Q)ansible-playbook $(ANSIBLE_VERBOSE) \
-		-i hosts \
 		playbooks/ai_uninstall.yml \
 		--extra-vars=@$(KDEVOPS_EXTRA_VARS) \
 		--extra-vars="$(AI_ARGS) $(AI_MANUAL_ARGS)" \
@@ -119,7 +106,6 @@ ai-uninstall:
 
 ai-destroy:
 	$(Q)ansible-playbook $(ANSIBLE_VERBOSE) \
-		-i hosts \
 		playbooks/ai_destroy.yml \
 		--extra-vars=@$(KDEVOPS_EXTRA_VARS) \
 		--extra-vars="$(AI_ARGS) $(AI_MANUAL_ARGS)" \
diff --git a/workflows/minio/Makefile b/workflows/minio/Makefile
index c543ed3b..05b822a0 100644
--- a/workflows/minio/Makefile
+++ b/workflows/minio/Makefile
@@ -14,25 +14,25 @@ $(MINIO_DATA_TARGET): $(ANSIBLE_INVENTORY_FILE)
 
 $(MINIO_DATA_TARGET_INSTALL): $(ANSIBLE_INVENTORY_FILE)
 	$(Q)ansible-playbook $(ANSIBLE_VERBOSE) \
-		-f 30 -i hosts $(MINIO_PLAYBOOK) \
+		$(MINIO_PLAYBOOK) \
 		--extra-vars=@$(KDEVOPS_EXTRA_VARS) \
 		--tags vars,minio_install
 
 $(MINIO_DATA_TARGET_UNINSTALL): $(ANSIBLE_INVENTORY_FILE)
 	$(Q)ansible-playbook $(ANSIBLE_VERBOSE) \
-		-f 30 -i hosts $(MINIO_PLAYBOOK) \
+		$(MINIO_PLAYBOOK) \
 		--extra-vars=@$(KDEVOPS_EXTRA_VARS) \
 		--tags vars,minio_uninstall
 
 $(MINIO_DATA_TARGET_DESTROY): $(ANSIBLE_INVENTORY_FILE)
 	$(Q)ansible-playbook $(ANSIBLE_VERBOSE) \
-		-f 30 -i hosts $(MINIO_PLAYBOOK) \
+		$(MINIO_PLAYBOOK) \
 		--extra-vars=@$(KDEVOPS_EXTRA_VARS) \
 		--tags vars,minio_destroy
 
 $(MINIO_DATA_TARGET_RUN): $(ANSIBLE_INVENTORY_FILE)
 	$(Q)ansible-playbook $(ANSIBLE_VERBOSE) \
-		-f 30 -i hosts $(MINIO_PLAYBOOK) \
+		$(MINIO_PLAYBOOK) \
 		--extra-vars=@$(KDEVOPS_EXTRA_VARS) \
 		--tags vars,minio_warp
 

-- 
2.50.1
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.