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

19 lines
577 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
- name: Create volume data dataset for user {{ service_user_name }}
zfs:
name: rpool/var/lib/{{ ansible_hostname }}/data/{{ service_user_name }}
state: present