-
Notifications
You must be signed in to change notification settings - Fork 664
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
Implementing delegated driver #1292
Comments
ok. trying to implement
molecule.yml
no interpolation done.
but according to http://molecule.readthedocs.io/en/latest/testing.html |
Molecule.yml does not know anything about It is the developers responsibility to create a ssh-config. It can be done manually or via automation, and can be placed wherever you wish. It does not need to live in the $MOLECULE_EPHEMERAL_DIRECTORY path. I suggest making your own convention for now. |
Delegated driver is for people who wish to connect to systems that may or may not be managed by Molecule. Molecule does not make any assumptions here. So it is a pretty bare driver. You supply your create/destroy playbooks, and your own ssh config file. Molecule simply ssh'es into the systems. The instance config is not necessary, b/c the instance config is specific to the Molecule driver code. It is a crappy attempt to get data generated from Ansible back into Molecule, and Molecule expects the dict to have certain keys. This is why I opted to just use an ssh config file for delegated. I hope that makes sense why things were done this way. Also, very few people use this. You're probably the first one, so we can obviously improve this ;) |
ok. not a problem. just want to follow main line.
i will be great if we can make ansible_host var available to playbook inventroy. i heave rely on in and on fact that it is an ip address. for example to make hosts file |
for my use case it is just adding code from vagrant.py to delegated.py works well |
any ideas how to make it work in upstream ? |
Make what work upstream @freeseacher ? |
Currently to make delegated driver works as expected i have to return code for ansible_connection_options and _get_instance_config functions. Otherwise there are no possibility to make ansible_host variable propagated well. Currently i made docker file with molecule and patched delegated.py. That looks like quick and dirty solution but i don't want make it work like this. So it will be good if we can add option/another driver ? Of cause i understand that using molecule not as intended to do. |
The delegated driver works if you supply the ssh-config. The delegated driver simply requires that you to supply the ssh-config. |
Did you use the delegated driver and set
Configuring your driver as follows, you should be able to login.
Is that not the case? I believe Molecule should act pretty much the same with delegated it just expects you to configure ssh. Molecule should have added the |
ok. adding
to driver and
to prepare really makes but inventory is build without
as mentioned early i heavily rely on it |
FYI - #1296 |
Okay, so we will do this.
Sound good? |
Yep. sounds good. |
The delegated driver defaults to `managed`, just like every other driver in Molecule. This driver now adheres to an instance-config API by default. Only, when `managed` is `False` does the driver force the developer to configure connectivity. Fixes: ansible#1292
The delegated driver defaults to `managed`, just like every other driver in Molecule. This driver now adheres to an instance-config API by default. Only, when `managed` is `False` does the driver force the developer to configure connectivity. Fixes: ansible#1292
The delegated driver defaults to `managed`, just like every other driver in Molecule. This driver now adheres to an instance-config API by default. Only, when `managed` is `False` does the driver force the developer to configure connectivity. Fixes: ansible#1292
The delegated driver defaults to `managed`, just like every other driver in Molecule. This driver now adheres to an instance-config API by default. Only, when `managed` is `False` does the driver force the developer to configure connectivity. Fixes: ansible#1292
The delegated driver defaults to `managed`, just like every other driver in Molecule. This driver now adheres to an instance-config API by default. Only, when `managed` is `False` does the driver force the developer to configure connectivity. Fixes: ansible#1292
@freeseacher Please try molecule on master. This should do what you expect. |
The delegated driver defaults to `managed`, just like every other driver in Molecule. This driver now adheres to an instance-config API by default. Only, when `managed` is `False` does the driver force the developer to configure connectivity. Fixes: #1292
Hello, there is a production version of this driver ? |
Issue Type
My molecule.yml
Create.yml
Instance created successfuly. i have file instance_config.yml
looks good.
but ansible_inventory.yml pretty useless because of node1 config sections.
so after converge stage i got
Docs says that i have to
It is the developers responsibility to configure the ssh config file.
Am i catching idea right that i have to add template for ssh_config file and put all connection logic to it?
something like
If yes what for instance_config.yml is used ? If no what should i do to implement delegated driver in a correct way ?
The text was updated successfully, but these errors were encountered: