Skip to content

Ansible role that installs nushell on Linux and MacOS systems

Notifications You must be signed in to change notification settings

Yethal/ansible-role-nushell

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Mar 16, 2025
e4161f5 · Mar 16, 2025

History

26 Commits
Mar 14, 2025
Mar 14, 2025
Mar 14, 2025
Mar 14, 2025
Mar 14, 2025
Mar 14, 2025
Aug 9, 2024
Mar 14, 2025
Mar 16, 2025
Mar 14, 2025
Sep 12, 2024
Jun 2, 2024

Repository files navigation

Ansible Role: Nushell

Installs Nushell on Linux and macOS systems

Requirements

None.

Role Variables

Available variables are listed below: For more information about variables marked with an asterisk please read the Caveats section

Variable Description Default
nushell_binary_path Directory where nushell binary will be stored /usr/local/bin
nushell_version either 'latest' or version tag latest
nushell_variant either 'default' or 'full' default
config_url url ansible should download config.nu file from nushell preset file
env_url url ansible should download env.nu file from nushell preset file
login_url url ansible should download login.nu file from nushell preset file
set_shell whether ansible should set nu as default shell of the user* false
install_plugins whether ansible should install bundled plugins true
install_configs whether ansible should install config files true
overwrite_configs whether ansible should overwrite config files on update false
nu_plugins which plugins should be registered by default all plugins
add_to_profile whether ansible should add path to nu to .profile* false
disable_banner whether built-in nushell banner should be disabled false
nu_users List of users for which config and plugins should be registered []
add_hostname_to_prompt Whether inventory hostname should be added to default prompt false
nu_hostname Hostname to add to prompt if add_hostname_to_prompt is true inventory_hostname
clear_login_file Whether login.nu should be cleared of all non-commented lines false

Plugin installation

plugins field should be a list of names

Caveats

Setting user shell to nushell breaks Ansible ssh connection therefore it is not recommended to set set_shell parameter to true unless you're using Ansible to provision your local machine or you have a separate user for running Ansible as. As a workaround you can set add_to_profile parameter to true which instead will add nushell to autostart for interactive sessions while maintaining compatibility with Ansible

Dependencies

None.

Local testing

Alternatively run pip install -r requirements.txt and run automated tests via molecule by running molecule test

Example Playbook

- hosts: servers
  roles:
     - yethal.nushell
  vars:
    add_to_profile: true
    disable_banner: true
    nu_users:
        - "{{ ansible_env.SUDO_USER }}"

License

BSD

Author Information

yethal

About

Ansible role that installs nushell on Linux and MacOS systems

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published