Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/Yethal/ansible-role-nushell
Ansible role that installs nushell on Linux and MacOS systems
https://github.com/Yethal/ansible-role-nushell
Last synced: 3 months ago
JSON representation
Ansible role that installs nushell on Linux and MacOS systems
- Host: GitHub
- URL: https://github.com/Yethal/ansible-role-nushell
- Owner: Yethal
- Created: 2023-05-27T10:59:21.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-09-12T14:56:25.000Z (4 months ago)
- Last Synced: 2024-09-13T03:14:05.456Z (4 months ago)
- Size: 52.7 KB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-nu - ansible
README
# 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 |
| 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](https://github.com/Yethal)