-
Notifications
You must be signed in to change notification settings - Fork 24
/
gen_pxe_files.yml
21 lines (18 loc) · 1.02 KB
/
gen_pxe_files.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
- name: generate pxe files for {{ atype }}
local_action: template src=templates/{{ atype }}/pxe.j2 dest={{ playbook_dir }}/workdir/{{ hostvars[item]['menu'] }}/{{ item }}
with_items: "{{ groups[atype] }}"
when: hostvars[item]['mac'] is not defined
run_once: true
- name: generate pxe files for {{ atype }}
template: src=templates/{{ atype }}/pxe.j2 dest={{ menu_dir }}/01-{{ hostvars[item]['mac']|regex_replace(':','-')|lower }}
with_items: "{{ groups[atype] }}"
when: hostvars[item]['mac'] is defined
- name: generate efi for {{ atype }}
local_action: template src=templates/{{ atype }}/efi.j2 dest={{ playbook_dir }}/workdir/{{ hostvars[item]['menu'] }}-grub2efi/{{ item }}
with_items: "{{ groups[atype] }}"
when: hostvars[item]['mac'] is not defined
run_once: true
- name: generate efi files for {{ atype }}
template: src=templates/{{ atype }}/efi.j2 dest={{ efi_dir }}/grub.cfg-01-{{ hostvars[item]['mac']|regex_replace(':','-')|lower }}-
with_items: "{{ groups[atype] }}"
when: hostvars[item]['mac'] is defined