[PATCH 8/8] playbooks: Fix host pattern for single-node setups

Luis Chamberlain <[email protected]> Fri, 17 Oct 2025 19:31:53 -0700
Newsgroups dev.linux.lists.kdevops
Message-ID <[email protected]>
Change devconfig.yml and update_etc_hosts.yml to use "all:!localhost"
instead of "baseline:dev:service" as the host pattern. This fixes
warnings about unmatched host groups during bringup for single-node
configurations like rcloud-guest-test.

The hardcoded "baseline:dev:service" pattern only works for A/B testing
setups with dedicated service nodes. Single-node setups don't have these
groups defined, causing Ansible to emit warnings:

  [WARNING]: Could not match supplied host pattern, ignoring: baseline
  [WARNING]: Could not match supplied host pattern, ignoring: dev
  [WARNING]: Could not match supplied host pattern, ignoring: service

Using "all:!localhost" works for all deployment scenarios:
- Single-node: runs on the node, skips localhost
- A/B testing: runs on baseline and dev nodes, skips localhost
- With service nodes: includes service nodes, skips localhost

Commmit 1cf0800c9ffce ("gen_hosts: templates: include localhost in the
all group") introduced this new warning and commit 94d0e3157a017
("devconfig: include the "service" group in theplaybooks hosts list")
extended it with the service group.

Generated-by: Claude AI
Fixes: 1cf0800c9ffce ("gen_hosts: templates: include localhost in the all group")
Fxies: 94d0e3157a017 ("devconfig: include the "service" group in theplaybooks hosts list")
Signed-off-by: Luis Chamberlain <[email protected]>
---
 playbooks/devconfig.yml        | 2 +-
 playbooks/update_etc_hosts.yml | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/playbooks/devconfig.yml b/playbooks/devconfig.yml
index f0ca7d76..e1d97138 100644
--- a/playbooks/devconfig.yml
+++ b/playbooks/devconfig.yml
@@ -1,6 +1,6 @@
 ---
 - name: Configure developer environment on target systems
-  hosts: baseline:dev:service
+  hosts: all:!localhost
   gather_facts: false
   roles:
     - role: devconfig
diff --git a/playbooks/update_etc_hosts.yml b/playbooks/update_etc_hosts.yml
index a8e9bc26..5a7d83d6 100644
--- a/playbooks/update_etc_hosts.yml
+++ b/playbooks/update_etc_hosts.yml
@@ -1,6 +1,6 @@
 ---
 - name: Update target /etc/hosts with all targets and disable cloud-init
-  hosts: baseline:dev:service
+  hosts: all:!localhost
   gather_facts: false
   roles:
     - role: update_etc_hosts
-- 
2.51.0