conda-pkg-mgr

Example:

# install conda package manager
- conda-pkg-mgr

Description

Install the conda package manager.

No root permissions are required for this as long as the bzip2 system package is available.

If you specify a different 'user', it's currently not possible to add conda init code to that users '.profile'. You need to manually set 'no_add_to_path' to true to not get an error

Resources

Variables

Name Type Default Description

init_files

list ['{{ ansible_env.HOME }}/.profile']

Files to add a 'PATH=...' directive to.

no_add_to_path

boolean False

Don't add conda to PATH in init files.

user

string --

The user to install conda for.

Examples

Example 1

install conda package manager

Code
- conda-pkg-mgr

Example 2

install conda package manager withoug adding it to PATH

Code
- conda-pkg-mgr:
    no_add_to_path: true

Example 3

install conda package manager, add PATH to custom file

Code
- conda-pkg-mgr:
    init_files:
    - '{{ ansible_env.HOME }}/.init.sh'
Description

This adds the short bash snippet that adds 'conda' to the PATH env variable to the file $HOME/.init.sh instead of $HOME/.profile.

Example 4

install conda package manager for user 'freckles'

Code
- conda-pkg-mgr:
    user: freckles
    no_add_to_path: true
Description

This creates the user 'freckles' if it doesn't already exist, then installs conda for that user. Be aware, adding conda init code to the users '.profile' is currently not possible, so you have to manually set 'no_add_to_path' to true to not get an error.

Command-line

frecklecute conda-pkg-mgr --help

Usage: frecklecute conda-pkg-mgr [OPTIONS]

  Install the conda package manager.

  No root permissions are required for this as long as the ``bzip2`` system
  package is available.

  If you specify a different 'user', it's currently not possible to add
  conda init code to that users '.profile'. You need to manually set
  'no_add_to_path' to true to not get an error

Options:
  --init-file PATH  Files to add a 'PATH=...' directive to.
  --no-add-to-path  Don't add conda to PATH in init files.
  --user USER       The user to install conda for.
  --help            Show this message and exit.