diff --git a/files/zprofile b/files/zprofile new file mode 100644 index 0000000..da0b4d0 --- /dev/null +++ b/files/zprofile @@ -0,0 +1,15 @@ +# /etc/zsh/zprofile: system-wide .zprofile file for zsh(1). +# +# This file is sourced only for login shells (i.e. shells +# invoked with "-" as the first character of argv[0], and +# shells invoked with the -l flag.) +# +# Global Order: zshenv, zprofile, zshrc, zlogin +if [ -d /etc/profile.d ]; then + for i in /etc/profile.d/*.sh; do + if [ -r $i ]; then + . $i + fi + done + unset i +fi \ No newline at end of file diff --git a/playbooks/software/zsh/deploy-zsh.yml b/playbooks/software/zsh/deploy-zsh.yml index 4958eb9..82b5d7d 100644 --- a/playbooks/software/zsh/deploy-zsh.yml +++ b/playbooks/software/zsh/deploy-zsh.yml @@ -31,6 +31,14 @@ update_cache: yes tags: [always] + - name: "Копируем эталонный конфиг zprofile для применения /etc/profile.d/* файлов" + copy: + src: ../../../files/zprofile + dest: "/etc/zsh/zprofile" + owner: root + group: root + mode: '0644' + - name: Накат ZSH и плагинов для каждого пользователя include_tasks: user-tasks.yml loop: "{{ zsh_users }}" diff --git a/playbooks/software/zsh/user-tasks.yml b/playbooks/software/zsh/user-tasks.yml index ddcf243..014dd1f 100644 --- a/playbooks/software/zsh/user-tasks.yml +++ b/playbooks/software/zsh/user-tasks.yml @@ -129,7 +129,7 @@ owner: "{{ current_user }}" group: "{{ current_user }}" mode: '0644' - #tags: [deploy, update] # Обновляем конфиг p10k в обоих сценариях, если ты решишь его изменить локально + #tags: [deploy, update] # Обновляем конфиг p10k в обоих сценариях, если ты решишь его изменить локально - name: "[{{ current_user }}] Генерируем итоговый .zshrc из шаблона" template: