-
Notifications
You must be signed in to change notification settings - Fork 660
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
Allow configuration of install_local bool in prerun #3464
Comments
Hi @Nubly
Could you verify whether both #3514 and ansible/ansible-compat#135 clear your concerns?
Yes. If If both PRs are merged, the requirements would be installed in an isolated directory, which is similar to how |
Hi, @zhan9san. #3514 does indeed mitigate my issue, but not necessarily at the source. My issue would be better solved by avoiding symlinks being created whatsoever, not just moving them to a cache dir. In my environment, which is perhaps a bit atypical, I had some additional tooling acting as an interface to my Ansible roles. I've since changed that tooling to accomodate for the symlinks, but they're still a bit annoying as I've got two directories for each of my roles in my I had thought that allowing configuration of the In short - yes, those pull requests you mentioned do indeed mitigate my issues. Thanks. |
#3569 should have fixed that one |
Issue Type
Molecule and Ansible details
Molecule installation method:
pip
Ansible installation method:
pip
Detail any linters or test runners used:
molecule
ansible-lint
yamllint
flake8
Desired Behavior
No symlink being left within the roles dir post-molecule action. Perhaps by way of a configuration option, or a flag.
Actual Behaviour
Misc Info
This was discussed a bit in issue #3404 and pull request #3409.
My ansible environment consists of a large amount of roles within the same directory.
All roles which I have developed only depend on other roles I have developed, and thus there really isn't a need for me to use a namespace as I also do not publish them to Galaxy. It's a bit silly for me to have to worry about Galaxy naming requirements when I will not publish anything from my environment to Galaxy.
Since the
install_local
boolean was hardcodedTrue
within #3409, on every Molecule action in which the prerun takes place, Molecule is creating symlinksto roles which are already installed in the
ANSIBLE_ROLES_PATH
as a result of theprepare_environment()
function continuing past theinstall_local
check and then calling_install_galaxy_role
.The
_install_galaxy_role
function is also the only reason I am using a namespace, as it exits with an error by default if my role names are not up to spec even though they don't have to be.At first, I thought that I could change my role directory naming convention to
$namespace.$role_name
to prevent this, but then I was met with ansible-compat #97.I still want to be able to install requirements from
requirements.yml
, and as such I am unable to explicitly disable the prerun. However, I'd like to be able to disable the Galaxy role installation steps as I know that my any/all roles needed in my roles are present in my roles path and able to be found, as setting the boolean within the code to False results in my tests still running as they should.I'd like to be able to specify a flag from CLI or configuration option within
molecule.yml
or some other applicable file to allow the value of theinstall_local
boolean to be configured within Molecule's prerun, thereby allowing configuration of the creation of these symlinks (and installation of Galaxy roles). There was a small amount of discussion on this on #3409.The text was updated successfully, but these errors were encountered: