47 lines
1.1 KiB
YAML
47 lines
1.1 KiB
YAML
---
|
|
- name: Install Packages
|
|
community.general.pkgng:
|
|
state: present
|
|
name: "{{ packages }}"
|
|
|
|
# FIXME: remove the symlink in the next release snapshot
|
|
- name: Remove old home sym link
|
|
shell: |
|
|
rm /home
|
|
touch /tmp/.ansible.home
|
|
args:
|
|
creates: "/tmp/.ansible.home"
|
|
|
|
- name: Remove original cron tab dir
|
|
shell: |
|
|
rm -rf /var/cron/tabs
|
|
touch /tmp/.ansible.crontabs
|
|
args:
|
|
creates: "/tmp/.ansible.crontabs"
|
|
|
|
- name: Setup home volume partition
|
|
shell: |
|
|
gpart create -s GPT da1
|
|
touch /tmp/.ansible.gpt
|
|
args:
|
|
creates: "/tmp/.ansible.gpt"
|
|
|
|
- name: Setup home fs type
|
|
shell: |
|
|
gpart add -t freebsd-zfs -l {{ storage.volume.name }} -a 1M {{ storage.volume.device }}
|
|
touch /tmp/.ansible.add
|
|
args:
|
|
creates: "/tmp/.ansible.add"
|
|
|
|
- name: Create zpool using home volume
|
|
shell: "zpool create -f {{ storage.volume.name }} {{ storage.volume.device }}"
|
|
args:
|
|
creates: "/{{ storage.volume.name }}"
|
|
|
|
- name: Create zfs home dataset
|
|
loop: "{{ storage.mounts }}"
|
|
shell: "zfs create -o mountpoint={{ item.mount }} {{ storage.volume.name }}{{ item.name }}"
|
|
args:
|
|
creates: "{{ item.mount }}"
|
|
|