Fix: Add Ansible user param to OpenStack templates 89/73889/2 v0.17.2
authorAnil Belur <abelur@linuxfoundation.org>
Wed, 12 Nov 2025 12:52:55 +0000 (22:52 +1000)
committerAnil Belur <abelur@linuxfoundation.org>
Wed, 12 Nov 2025 13:09:02 +0000 (23:09 +1000)
commitde07429afe42fe5cceff96b9d4cf82f0af54fcd2
tree555cc14b4788c13cc357b8552e06be968b144946
parent93795e83d5d1761a407a36d17fc4dd93a955d223
Fix: Add Ansible user param to OpenStack templates

The Ansible provisioner in OpenStack templates was missing the 'user'
parameter, causing Ansible to default to the wrong user account when
connecting to instances. This resulted in SCP failures with errors
like:

scp: dest open '~runner/.ansible/tmp/...': No such file or directory

Root cause: During the HCL2 conversion (commit 6e2fdc9), AWS
templates were created with 'user = "${var.ssh_user}"' but OpenStack
templates were not. This was an oversight that went undetected.

This fix adds the 'user' parameter to match the AWS template pattern,
ensuring Ansible uses the correct SSH user (ubuntu/centos/cloud-user)
as defined in the vars files.

Templates updated:
- builder.pkr.hcl
- docker.pkr.hcl
- devstack.pkr.hcl
- devstack-pre-pip-yoga.pkr.hcl
- windows-builder.pkr.hcl

Backward compatibility: This change is fully backward compatible as:
1. The ssh_user variable already exists in all vars files
2. AWS templates already use this pattern successfully
3. No existing Jenkins jobs are affected (they already work)

Change-Id: I985e8a4e8742b3b04ec024c6799bcc5feb908098
Signed-off-by: Anil Belur <abelur@linuxfoundation.org>
releasenotes/notes/fix-ansible-user-parameter-5a3af8248a4fb494.yaml [new file with mode: 0644]
templates/builder.pkr.hcl
templates/devstack-pre-pip-yoga.pkr.hcl
templates/devstack.pkr.hcl
templates/docker.pkr.hcl
templates/windows-builder.pkr.hcl