Apply /etc/environment for runtime after adjustment
Depends-On: https://review.opendev.org/c/openstack/openstack-ansible-openstack_hosts/+/766030 Change-Id: I94008de1fe97400ab37de39d03599fa9f53ab3f0
This commit is contained in:
parent
319f5263e8
commit
c17d811fa1
@ -178,6 +178,11 @@ else
|
||||
# Log some data about the instance and the rest of the system
|
||||
log_instance_info
|
||||
|
||||
# Reload environment file and apply variables for the session
|
||||
set -a
|
||||
. /etc/environment
|
||||
set +a
|
||||
|
||||
# Once setup-hosts is complete, we should gather facts for everything
|
||||
# (now including containers) so that the fact cache is complete for the
|
||||
# remainder of the run.
|
||||
|
@ -112,6 +112,12 @@
|
||||
when:
|
||||
- ansible_selinux.status == "enabled"
|
||||
|
||||
- name: Get systemd version
|
||||
command: "rpm -q systemd"
|
||||
changed_when: false
|
||||
register: systemd_version
|
||||
when: ansible_os_family | lower == 'redhat'
|
||||
|
||||
- name: Set the user_variables
|
||||
config_template:
|
||||
src: "{{ bootstrap_user_variables_template }}"
|
||||
|
@ -13,6 +13,11 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
{% if ansible_os_family | lower == 'redhat' %}
|
||||
deployment_environment_variables:
|
||||
LIBSYSTEMD_VERSION: {{ systemd_version.stdout_lines[0].split('-')[1] }}
|
||||
{% endif %}
|
||||
|
||||
## General options
|
||||
debug: True
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user