This commit is contained in:
2025-06-06 10:31:32 +02:00
parent 1b53d23b9b
commit f88822a742
35 changed files with 257 additions and 12063 deletions

View File

@ -5,13 +5,27 @@
# ---
# nis_users
#- name: (nis-user-systemfiles.yml) Check if local template directory exists for default users
# local_action: stat path={{ inventory_dir }}/files/{{ nis_domain}}/homedirs/{{ item.name }}
# with_items: "{{ nis_user }}"
# loop_control:
# label: '{{ item.name }}'
# register: local_template_dir_nis_user
- name: (nis-user-systemfiles.yml) Check if local template directory exists for default users
local_action: stat path={{ inventory_dir }}/files/homedirs/{{ item.name }}
delegate_to: localhost
stat:
path: "{{ inventory_dir }}/files/{{ nis_domain}}/homedirs/{{ item.name }}"
with_items: "{{ nis_user }}"
loop_control:
label: '{{ item.name }}'
register: local_template_dir_nis_user
#- name: Print variable local_template_dir_nis_user
# debug: var=local_template_dir_nis_user.results
#- meta: end_play
# --
# Copy .profile
@ -65,6 +79,7 @@
label: '{{ item.item.name }}'
when:
- item.stat.exists == false
- lookup('fileglob', inventory_dir + '/files/' + nis_domain + '/homedirs/DEFAULT/_profile.j2')
tags:
- profile