Move path changes to .profile so that display managers see it.

This commit is contained in:
2026-07-16 17:37:33 -07:00
parent 3823aa438a
commit 70114784a5
+20 -1
View File
@@ -1113,6 +1113,8 @@
- name: General | Account Management | Users | Files | Common Variable - name: General | Account Management | Users | Files | Common Variable
set_fact: set_fact:
rc_profile: |
{{ export_path_additions }}
rc_common: | rc_common: |
# Fixes "command not found" when using aliases within functions. # Fixes "command not found" when using aliases within functions.
shopt -s expand_aliases shopt -s expand_aliases
@@ -1129,7 +1131,6 @@
export server="{{ server }}" export server="{{ server }}"
export domain="{{ domain }}" export domain="{{ domain }}"
{{ export_path_additions }}
{{ source_shared }} {{ source_shared }}
{{ alias_cp }} {{ alias_cp }}
{{ alias_mv }} {{ alias_mv }}
@@ -1193,6 +1194,24 @@
{{ function_loop }} {{ function_loop }}
{{ process_notify_log }} {{ process_notify_log }}
- name: General | Account Management | Users | Files | .profile
blockinfile:
path: "{{ item }}/.profile"
block: |
{{ rc_profile }}
[[ $(whoami) != "root" ]] &&
echo "`date` - Ansible .profile loaded successfully!"
marker: '# {mark} MANAGED BY ANSIBLE | Aliases'
state: present
create: yes
backup: no
loop:
- "{{ user_root.home }}"
- "{{ user_user.home }}"
ignore_errors: yes
when: user_root.home != "" and user_user.home != ""
- name: General | Account Management | Users | Files | .bashrc - name: General | Account Management | Users | Files | .bashrc
blockinfile: blockinfile:
path: "{{ item }}/.bashrc" path: "{{ item }}/.bashrc"