manala.environment
#######################################################################################################
:exclamation: DEPRECATION :exclamation:
This repository and the role associated are deprecated in favor of the Manala Ansible Collection
You will find informations on its usage on the collection repository
#######################################################################################################
Ansible Role: Environment 
:exclamation: Report issues and send Pull Requests in the main Ansible Role repository :exclamation:
This role will deal with the setup of environment variables.
It's part of the Manala Ansible stack but can be used as a stand alone component.
Requirements
None.
Dependencies
None.
Installation
Ansible 2+
Using ansible galaxy cli:
ansible-galaxy install manala.environment
Using ansible galaxy requirements file:
- src: manala.environment
Role Variables
| Name | Default | Type | Description |
|---|---|---|---|
manala_environment_files |
['pam'] | Array | Environment files |
manala_environment_variables |
{}/[] | Array | Environment variables |
Configuration example
Note that only string, integer or float variables are supported.
manala_environment_files:
- pam # /etc/environment
- zsh # /etc/zsh/zshenv
- file: /etc/profile.d/test.sh # Custom file
export: true # Use "export" when setting variable
manala_environment_variables:
FOO: bar
BAR: true
For legacy purposes, manala_environment_variables also accepts values as
a dictionnary list.
Note that in this mode (and only in this mode), some non-scalar values are
interpreted to strings.
manala_environment_variables:
- FOO: bar
- FOO_NULL: ~ # -> "null"
- FOO_TRUE: true # -> "true"
- FOO_FALSE: false # -> "false"
Example playbook
- hosts: servers
roles:
- { role: manala.environment }
Licence
MIT
Author information
Manala (http://www.manala.io/)
ansible-galaxy install manala.environment