ansible-install-server/roles/fai/tasks/fai-root.yml

36 lines
780 B
YAML

- name: test nfsroot exists
stat:
path: /srv/fai/nfsroot
register: nfsroot_res
tags:
- fai
- root
- name: test if fai-setup already ran
file:
dest: /srv/fai/nfsroot
state: absent
when: "ensure_fai_setup_run and not disable_fai_chroot_build"
tags:
- fai
- root
- name: generate fai chroot
shell: fai-make-nfsroot -N
when: "(not nfsroot_res.stat.exists or ensure_fai_setup_run) and not disable_fai_chroot_build"
tags:
- fai
- root
- name: test squash image
stat:
path: /srv/tftp/fai/squash.img
register: squash_img
- name: generate squashfs
shell: fai-cd -f -M -S /srv/tftp/fai/squash.img
when: "(not squash_img.stat.exists or ensure_fai_setup_run) and not disable_fai_chroot_build"
tags:
- fai
- root