-
Notifications
You must be signed in to change notification settings - Fork 32
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
Variable for shell profile user #84
Comments
@mhadam I completely agree. It was moved away from a pretty convoluted logic system previously but I'll have a think about reimplementing it. Did you have any specific ideas? edit: Perhaps it could be that shell profiles are ignored when a given user (the optional variable) is not defined? That would mean it wouldn't break compatibility or increase needless logic. Ideas? edit: Perhaps it would be easier by simply providing an absolute path to a shell profile (presumably |
Signed-off-by: Karl Hepworth <karl.hepworth@gmail.com>
Any chance you can test branch The results are promising! You can test the shell profiles by specifying Those tasks also only run when a different Go version is installed. I'd like to improve the idempotence to allow them to run on every run - stay tuned. |
Thanks so much! I'll try to test this soon and get back with results. |
FYI I've noticed this is failing all tests on a particular task when the variable is undefined. Should you run into that problem, I already have a fix on the way - but it's just on the shell restart task. You can place a |
The branch It depends on this issue merging, but it's working exactly as intended and should fix the issue originally described. It doesn't however prevent the use of As previously discussed, I am waiting for a response - however it would be equally acceptable if you were to test against branch Edit: See #85 Edit: The playbook example is forced |
Sorry, finally got around to this. Here's the relevant part of the settings I have right now:
The situation is that the role is being used to setup a VM environment to test code. Honestly it may not need to be put in An error I found - it assumes that the specified .bash_profile exists, so it throws an error when they don't. I'll patch that now. Edit: I ended up using |
It should be noted that I'll get a commit in tonight to do a basic stat check which will prevent the tasks from executing if they don't exist. I'll update the readme as well, it's a logical decision despite the fact the variable doesn't have a default value. So if that is in place, is any more work required here to solve the problem, am I missing the mark for what's needed, or are we able to line a new release up? I'm keen to get this one closed as it's last on the list for the next release, but I want to make sure this is completely fixed before-hand. |
The changes in #85 will be migrated into this issue after the tests have run. Brand After you've run your test again, I'd appreciate it if you shared your results and what else is needed to progress this issue. |
Could you please provide the results of your test in the next 7 days? I'm keen to get this merged and released then. If there are lingering issues, we can put this off for the next release. |
Yup everything seems to be working fine! Thanks, and sorry for not getting back sooner! |
All good, thank you! |
When running this role with sudo, I'm unable to write the shell profile to the proper user since sudo makes the ansible_user_id
root
. It would be nice if I could optionally set a user for the shell profile or just add a full path to the file I want written.The text was updated successfully, but these errors were encountered: