hashicorp / hashicorp/packer-plugin-lxd
Add support for communicator SSH
- Dominant language
- Go
- Stars
- 14
- Forks
- 20
- PR merge metrics
- No merged PRs in 30d
Description
#### Description
The plugin doesn't support the communicator configuration and if I would configure for ansible provisioner ansible with use_proxy set to false I noticed this error:
```
==> lxd.rhel: Warning: use_proxy is false, but instance does not have an IP address to give to Ansible. Falling back to use localhost proxy.
==> lxd.rhel: Warning: use_proxy is false, but communicator is neither ssh nor winrm, so without the proxy ansible will not function. Falling back to localhost proxy.
```
In this case the lxc-exec command fails and the ansible connection remains in hang and I can't connect to the the lxd VM directly via SSH.
#### Use Case(s)
Add the possibility to connect directly via SSH and avoid the usage of lxc exec.
#### Potential configuration
```
source "lxd" "rhel" {
...
communicator = "ssh"
...
}
```
#### Potential References
Contributor guide
Research direction
Start by tracing how the LXD builder handles the communicator configuration and how Ansible provisioning selects lxc-exec versus direct connections. Use the reported use_proxy=false scenario and the proposed communicator = "ssh" configuration as the acceptance case; done means direct SSH connection works without the localhost proxy or lxc-exec fallback.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- devops, infrastructure
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100