Skip to content
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

MOLECULE_EPHEMERAL_DIRECTORY is a route inside /tmp directory #1506

Closed
morenod opened this issue Oct 10, 2018 · 2 comments · Fixed by #2089
Closed

MOLECULE_EPHEMERAL_DIRECTORY is a route inside /tmp directory #1506

morenod opened this issue Oct 10, 2018 · 2 comments · Fixed by #2089

Comments

@morenod
Copy link

morenod commented Oct 10, 2018

Issue Type

  • Bug report
  • Feature request

Molecule and Ansible details

ansible --version
molecule --version

Molecule installation method (one of):

  • source
  • pip

Ansible installation method (one of):

  • source
  • pip
  • OS package

Desired Behavior

Please give some details of the feature being requested or what
should happen if providing a bug report.

Actual Behaviour (Bug report only)

Please give some details of what is actually happening.
Include a minimum complete verifiable example with
output of running molecule --debug.

I cannot create relative routes for MOLECULE_EPHEMERAL_DIRECTORY because its is forced to be inside /tmp dir

@wilmardo
Copy link
Contributor

You can set the value of MOLECULE_EPHEMERAL_DIRECTORY by specifying ephemeral_directory under scenario in the molecule.yml file. (I use this to move persistence out of my Docker container)
Like this:

scenario:
  name: default
  ephemeral_directory: /win-test-role/molecule/default/.molecule

This changes the environment variable MOLECULE_EPHEMERAL_DIRECTORY to /win-test-role/molecule/default/.molecule but for the default scenario only.

Does this help you along? If not please give some more information, describe what you want to accomplish with creating relative routes.

@retr0h
Copy link
Contributor

retr0h commented Oct 11, 2018

I cannot create relative routes for MOLECULE_EPHEMERAL_DIRECTORY because its is forced to be inside /tmp dir

Doesn't really describe the problem too well. Either way, you can do what @wilmardo suggested. Other than that, you're right you can't change it.

@retr0h retr0h closed this as completed Oct 15, 2018
ssbarnea added a commit to ssbarnea/molecule that referenced this issue Jun 6, 2019
To avoid hardcoded temporary directories which can create conflicts with
concurrent use or with multi-user environments, we adopt the use of
the newer tempfile.TemporaryDirectory.

For old python versions we install the backport module which provides
this functionality.

Signed-off-by: Sorin Sbarnea <sorin.sbarnea@gmail.com>
Fixes: ansible#1506
@helpr helpr bot added the pr-available label Jun 6, 2019
ssbarnea added a commit to ssbarnea/molecule that referenced this issue Jun 7, 2019
Avoid hardcoded temporary directories which can create conflicts with
with multi-user environments.

Signed-off-by: Sorin Sbarnea <sorin.sbarnea@gmail.com>
Fixes: ansible#1506
ssbarnea added a commit to ssbarnea/molecule that referenced this issue Jun 7, 2019
Avoid hardcoded temporary directories which can create conflicts with
with multi-user environments.

Signed-off-by: Sorin Sbarnea <sorin.sbarnea@gmail.com>
Fixes: ansible#1506
ssbarnea added a commit to ssbarnea/molecule that referenced this issue Jun 7, 2019
Avoid hardcoded temporary directories which can create conflicts with
with multi-user environments.

Signed-off-by: Sorin Sbarnea <ssbarnea@redhat.com>
Fixes: ansible#1506
ssbarnea added a commit to ssbarnea/molecule that referenced this issue Jun 15, 2019
Avoid hardcoded temporary directories which can create conflicts with
with multi-user environments.

Signed-off-by: Sorin Sbarnea <ssbarnea@redhat.com>
Fixes: ansible#1506
ssbarnea added a commit to ssbarnea/molecule that referenced this issue Jun 18, 2019
Avoid hardcoded temporary directories which can create conflicts with
with multi-user environments.

Signed-off-by: Sorin Sbarnea <ssbarnea@redhat.com>
Fixes: ansible#1506
ssbarnea added a commit to ssbarnea/molecule that referenced this issue Jun 19, 2019
Avoid hardcoded temporary directories which can create conflicts with
with multi-user environments.

Signed-off-by: Sorin Sbarnea <ssbarnea@redhat.com>
Fixes: ansible#1506
ssbarnea added a commit to ssbarnea/molecule that referenced this issue Jun 19, 2019
Avoid hardcoded temporary directories which can create conflicts with
with multi-user environments.

Signed-off-by: Sorin Sbarnea <ssbarnea@redhat.com>
Fixes: ansible#1506
@helpr helpr bot removed the pr-available label Jun 22, 2019
ssbarnea added a commit that referenced this issue Jun 22, 2019
Avoid hardcoded temporary directories which can create conflicts with
with multi-user environments.

Signed-off-by: Sorin Sbarnea <ssbarnea@redhat.com>
Fixes: #1506
@helpr helpr bot added the pr-merged label Jun 22, 2019
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 a pull request may close this issue.

3 participants