Добавлены дополнительные переменные окружения
This commit is contained in:
@ -15,6 +15,7 @@
|
||||
group: '{{ owner_group }}'
|
||||
groups: '{{ owner_extra_groups }}'
|
||||
shell: /bin/bash
|
||||
register: uc_result
|
||||
|
||||
- name: 'Set up user ssh keys for user "{{ owner_name }}".'
|
||||
authorized_key:
|
||||
@ -24,6 +25,15 @@
|
||||
with_items: '{{ owner_ssh_keys }}'
|
||||
when: owner_ssh_keys
|
||||
|
||||
- name: 'Prepare env variables.'
|
||||
set_fact:
|
||||
env_dict: '{{ owner_env | combine({
|
||||
"CURRENT_UID": uc_result.uid | default(owner_name),
|
||||
"CURRENT_GID": uc_result.group | default(owner_group),
|
||||
}) }}'
|
||||
tags:
|
||||
- env
|
||||
|
||||
- name: 'Set up environment variables for user "{{ owner_name }}".'
|
||||
template:
|
||||
src: env.j2
|
||||
@ -38,7 +48,7 @@
|
||||
path: '/home/{{ owner_name }}/.bashrc'
|
||||
regexp: '^export {{ item.key }}='
|
||||
state: absent
|
||||
with_dict: '{{ owner_env }}'
|
||||
with_dict: '{{ env_dict }}'
|
||||
tags:
|
||||
- env
|
||||
|
||||
|
Reference in New Issue
Block a user