Allow environment PATH customization

Adds a list variable to configure the PATH set in /etc/environment
on the openstack hosts.

Change-Id: Ia36deb59d5a5c8928fdd275922adcad1c8ac0fc4
This commit is contained in:
Logan V
2016-10-16 12:04:44 -05:00
parent ed8e4ca621
commit 207eb5dd17
3 changed files with 17 additions and 2 deletions

View File

@@ -46,6 +46,18 @@ gc_val: "{{ ansible_memtotal_mb | default(1024) | bit_length_power_of_2 }}"
# The ste value has a Max allowable value of 8192 unless set by the user.
set_gc_val: "{{ gc_val if (gc_val | int <= 8192) else 8192 }}"
# Controls the shell search PATH environment variable dropped in
# /etc/environment
openstack_host_environment_path:
- /usr/local/sbin
- /usr/local/bin
- /usr/sbin
- /usr/bin
- /sbin
- /bin
- /usr/games
- /usr/local/games
# System control kernel tuning
openstack_kernel_options:
- { key: 'fs.inotify.max_user_watches', value: 36864 }
@@ -75,4 +87,3 @@ openstack_kernel_options:
# Set the openstack domain name
openstack_domain: openstack.local

View File

@@ -0,0 +1,4 @@
---
features:
- The PATH environment variable that is configured on the remote system can
now be set using the ``openstack_host_environment_path`` list variable.

View File

@@ -1,6 +1,6 @@
# {{ ansible_managed }}
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games"
PATH="{{ openstack_host_environment_path | join(':') }}"
{% if global_environment_variables is defined %}
{% for key, value in global_environment_variables.iteritems() %}
{% if value %}