https://github.com/alphahydrae/ansible-root-profile
Ansible role that creates a .profile file for the root user.
https://github.com/alphahydrae/ansible-root-profile
Last synced: 6 months ago
JSON representation
Ansible role that creates a .profile file for the root user.
- Host: GitHub
- URL: https://github.com/alphahydrae/ansible-root-profile
- Owner: AlphaHydrae
- License: mit
- Created: 2016-06-20T12:50:12.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2016-07-26T20:44:44.000Z (almost 10 years ago)
- Last Synced: 2025-07-29T03:49:35.176Z (12 months ago)
- Size: 2.93 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# Ansible Root Profile
[Ansible](https://www.ansible.com) role that creates a `.profile` file for the root user with the PATH correctly set up for the platform's package manager (e.g. Homebrew or MacPorts).
It also sets the LANG environment variable (to `en_US.UTF-8` by default).
## Role Variables
* `root_profile_lang` - If set, it will be exported as the LANG environment variable (defaults to `en_US.UTF-8`; set to `false` to remove it).
* `root_profile_additional_paths` - Additional semicolon-separated directories to add to the PATH (must end with a semicolon, e.g. `/path1:/path/2:`).
* `root_profile_paths` - Directories that will be added to the PATH (combines `root_profile_additional_paths` and the `host_package_manager_paths` provided by the AlphaHydrae.multipass role).
## Dependencies
The [AlphaHydrae.multipass](https://github.com/AlphaHydrae/ansible-multipass) role is used to determine additional directories to be added to the PATH:
* `host_package_manager_paths` - Additional directories to be added to the PATH for the host's package manager (e.g. `/usr/local/bin:` for Homebrew).
## Example Playbook
- hosts: servers
roles:
- role: AlphaHydrae.root-profile
**With additional directories added to the PATH**
- hosts: servers
roles:
- role: AlphaHydrae.root-profile
root_profile_additional_paths: "/opt/bin:/usr/bin:"