andrewrothstein / ansible-miniconda

MIT License
28 stars 26 forks source link

Add `miniconda_umask` #26

Closed msabramo closed 2 years ago

msabramo commented 2 years ago

Allow setting a custom umask, because on some systems (e.g.: an Amazon Linux EC2 instance I'm testing with, the umask is set by default in /etc/profile to 027. This causes Miniconda to get installed with the read and execute bits missing for world so normal users get errors when they try to use miniconda tools.

With this, I can use:

     - name: Include ansible-miniconda role
       include_role:
         name: ansible-miniconda
         apply:
           tags: miniconda
       vars:
         miniconda_make_sys_default: True
         miniconda_tmp_dir: "{{ ansible_env.HOME }}/tmp"
         miniconda_umask: '022'
       when: install_miniconda
       tags: miniconda

and Miniconda gets installed so that it can be used by any user.

Note: This branch includes #25, because it touches the same lines and separating them would lead to merge conflicts. The "real" changes for this PR are in e54effb.

msabramo commented 2 years ago

Fixed merge conflict.

msabramo commented 2 years ago

This is similar to https://github.com/andrewrothstein/ansible-anaconda/pull/39 but for miniconda.