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

29 lines
756 B
YAML
Raw Normal View History

2020-10-14 22:20:05 +00:00
- copy:
dest: /etc/fai/nfsroot.conf
content: |
# For a detailed description see nfsroot.conf(5)
2020-08-26 10:10:36 +00:00
2020-10-14 22:20:05 +00:00
# "<suite> <mirror>" for debootstrap
FAI_DEBOOTSTRAP="{{ debian_release }} http://localhost:3142/debian"
FAI_ROOTPW='$1$kBnWcO.E$djxB128U7dMkrltJHPf6d1'
2020-08-26 10:10:36 +00:00
2020-10-14 22:20:05 +00:00
NFSROOT=/srv/fai/nfsroot
TFTPROOT=/srv/tftp/fai
NFSROOT_HOOKS=/etc/fai/nfsroot-hooks/
FAI_DEBOOTSTRAP_OPTS="--exclude=wget"
2020-08-26 10:10:36 +00:00
2020-10-14 22:20:05 +00:00
# Configuration space
FAI_CONFIGDIR=/srv/fai/config
owner: root
group: root
mode: u=rw,g=r,o=r
- name: test nfsroot exists
2020-08-26 10:10:36 +00:00
stat:
2020-10-14 22:20:05 +00:00
path: /srv/fai/nfsroot
register: nfsroot_res
2020-08-26 10:10:36 +00:00
2020-10-14 22:20:05 +00:00
- name: generate root filesystem, kernel and initrd
shell: fai-make-nfsroot
when: "not nfsroot_res.stat.exists"