ansible-edda/playbooks/tasks/services/b-user/service-user/01-zfs-datasets.yml

20 lines
566 B
YAML
Raw Normal View History

- name: Create home dataset for user {{ service_user_name }}
zfs:
name: rpool/var/lib/{{ ansible_hostname }}/home/{{ service_user_name }}
state: present
register: user_zfs_home
- name: Populate home directory from skeleton directory
copy:
src: "/etc/skel/"
dest: "/var/lib/{{ ansible_hostname }}/home/{{ service_user_name }}"
remote_src: yes
when:
user_zfs_home is changed
2022-10-24 00:45:52 +02:00
- include_tasks: "{{ item }}"
with_first_found:
- files:
2022-10-30 21:20:45 +01:00
- "01-zfs-datasets.d/{{ service_name }}.yml"
- "01-zfs-datasets.d/_default.yml"