10000 Update Dockerfile.j2 by MadZimbo · Pull Request #1810 · ansible/molecule · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Update Dockerfile.j2 #1810

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

Closed
wants to merge 1 commit into from
Closed

Update Dockerfile.j2 #1810

wants to merge 1 commit into from

Conversation

MadZimbo
Copy link
@MadZimbo MadZimbo commented Mar 7, 2019

Added rsync package
Without rsync the Ansible synchronize module fails with
""msg": "protocol version mismatch -- is your shell clean?\n(see the rsync man page for an explanation)\nrsync error: protocol incompatibility (code 2)"
when testing with docker
Would be nice if this could be integrated

PR Type

  • Feature Pull Request

Added rsync package
Without rsync the Ansible synchronize module fails with
""msg": "protocol version mismatch -- is your shell clean?\n(see the rsync man page for an explanation)\nrsync error: protocol incompatibility (code 2)"
when testing with docker
Would be nice if this could be integrated

Signed-off-by: Christian Zimmermann <christian.zimmermann@h-its.org>
@ssbarnea
Copy link
Member
ssbarnea commented Mar 7, 2019

While this is valid it opens a multitude of questions: what needs to be in the default template and what needs to be out?

If we include rsync, we make the ansible module work but at the same time we would fail to validate a role that is supposed to install rsync if needed.

What is a an ansible-enabled image? Sadly the answer is not a boolean: you are likely going to have some modules working and some not working.

For example shade is needed in order to use openstack modules, do we include them or not? We need to decide what goes in and what goes out. What fixed a problem for someone may break for someone else.

@decentral1se
Copy link
Contributor

Hi @MadZimbo, thanks for the pull request.

You've stumbled on a rather touch area 😅 and to continue from @ssbarnea: I don't think it's for Molecule core to decide what goes in or out but to allow to configure. We just need to provide the minimal dependencies (I would say we are already going beyond that ...).

The solution for this problem so far has been to add it to your generated molecule/default/Dockerfile.j2. This isn't ideal but this is how I would solve this issue for now. What do you think @MadZimbo?

To note, there is a related discussion happening over at #1642. There is some motivation to see if we can get these images built (or not even build them) in a more "Ansible" way. We might imagine a extra_packages: [rsync] configuration in our molecule.yml then?

@MarkusTeufelberger
Copy link
Contributor

If you need to use a module (e.g. synchronize) with external dependencies, make sure that your role installs these dependencies or modify the Dockerfile.j2 file or the default playbook.yml locally.

It is really not feasible to install all dependencies of all modules by default.

@ssbarnea
Copy link
Member
ssbarnea commented Mar 7, 2019

As noted by others this is sensitive issue without any clear solution. Still, in order to improve the user experience we could consider adding some optional parameters for provisioning additional requirements.

I already have a custom dockerfile that adds extra packages so we may be able to build a more generic solution for enabling additional ansible modules on the builded images.

Default should be minimal in order to enable ansible to connect to the machine, but optionally we can boostrap additional ansible dependencies (optionals).

@MadZimbo
Copy link
Author
MadZimbo commented Mar 8, 2019

Hi @MadZimbo, thanks for the pull request.

You've stumbled on a rather touch area 😅 and to continue from @ssbarnea: I don't think it's for Molecule core to decide what goes in or out but to allow to configure. We just need to provide the minimal dependencies (I would say we are already going beyond that ...).

The solution for this problem so far has been to add it to your generated molecule/default/Dockerfile.j2. This isn't ideal but this is how I would solve this issue for now. What do you think @MadZimbo?

To note, there is a related discussion happening over at #1642. There is some motivation to see if we can get these images built (or not even build them) in a more "Ansible" way. We might imagine a extra_packages: [rsync] configuration in our molecule.yml then?

Hi @decentral1se, thanks for the reply. I see your point and based on the other comments it makes quite sense. Thanks for your time!

@decentral1se
Copy link
Contributor

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants
0