Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
33 lines (29 sloc) 850 Bytes
---
- hosts: kickstart
gather_facts: no
vars:
reboot: False
tasks:
- name: Gather
setup:
filter: ansible_default_ipv4
register: output
delegate_to: "{{ item }}"
delegate_facts: true
loop: "{{ groups['reinstall'] }}"
- name: Set PXE menu to install
file:
state: link
src: install
dest: "/var/lib/tftpboot/pxelinux.cfg/01-{{ hostvars[item]['ansible_default_ipv4']['macaddress'] | regex_replace(':','-') }}"
become: true
loop: "{{ groups['reinstall'] }}"
- name: Reboot target host for PXE boot
hpilo_boot:
host: "{{ hostvars[item]['ilo_ip'] }}"
media: network
password: "{{ hostvars[item]['ilo_password'] }}"
force: true
loop: "{{ groups['reinstall'] }}"
delegate_to: localhost
when: reboot
You can’t perform that action at this time.