-
Notifications
You must be signed in to change notification settings - Fork 3.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Expose connection settings in communicator to provisioners #3889
Comments
See #3331. |
#2991 is a bug and I think it has been fixed. |
I'm not sure what you mean by
And
Actually only ansible remote, and now you. |
ghehehe that hurt man ;) I thought I looked diligently, my apologies :) Anyway, it seems the concerns focus around lack of use case (which I apparently read very wrong in the other plugins ;) ) and the availability of the SSH Proxy the Ansible provisioner already uses... So my use case is Salt SSH, which, as mentioned is pretty similar to Ansible in setup. Given enough interest I'm planning to commit it here once it works. In the meantime, is this sufficient to warrant further discussion or am I going to try to plug in the adaptor from the Ansible provisioner? |
I'm open for reviewing this design again. But this is a core design of Packer so changes must be done carefully with a well thought out design. @cbednarski I guess these use cases will pop up from time to time. Maybe it's time to see if we can extend packer to allow such communication? |
#3911 is impacted by this decision. If the connection settings were exposed, it should make adding support for Ansible + WinRM easier. |
@The-Loeki this is something that I was trying to convince people to do for some time. Thank you so much for formalising what needs to be done in this issue. |
This is a big question and not something we're ready to implement. We should revisit this after 1.0. |
I'm trying to write a provisioner plugin for Salt SSH.
The process is largely similar to what Ansible does; open an SSH pipe and start doing stuff.
The problem I'm facing is therefore the same Ansible and a lot of other plugins seem to face: there's no access to the connection settings the
Communicator
already knows and the UI presents to me..This leads to a lot of workarounds, from the Ansible Provisioner's 'SSH Proxy/Adaptor' to OpenStack's API calling to get that info again. it also leads to confusion (#3828) among users and and often the name has to show up multiple times in the JSON.
From what I can tell it's a matter of either adding a small method to provide that info or exposing the Config struct to the provisioners.
I propose to add such a function to the Communicator interface or expose
Config
.Is that a good idea or am I missing a very good reason not to do it? Or is the situation much more complex than I'm anticipating now?
Related discussions:
ssh_host
option available to provisioners #3404The text was updated successfully, but these errors were encountered: