update..
This commit is contained in:
@ -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
|
||||
|
||||
|
Reference in New Issue
Block a user