Configures PXE
a hosts file that looks like this:
[compute] node1 int_ip_addr=10.1.2.1 ib_ip_addr=10.2.2.1 mac_address=00:11:22:33:44:55 node2 int_ip_addr=10.1.2.2 ib_ip_addr=10.2.2.2 mac_address=00:11:22:33:44:56 [pxe_bootable_nodes:children] compute
intDomain: "fgci.csc.fi"
siteName: "io"
These are the defaults:
hosts_file_pxe_group_to_populate: "{{ groups.pxe_bootable_nodes }}" hosts_file_admin_group_to_populate: "{{ groups.admin }}" hosts_file_install_group_to_populate: "{{ groups.install }}" hosts_file_login_group_to_populate: "{{ groups.login }}" hosts_file_extra_group_to_populate: ""
By setting the above to "" we disable that group. So let's say you only want to populate the production group, set the variables like so:
hosts_file_pxe_group_to_populate: "{{ groups.production }}" hosts_file_admin_group_to_populate: "" hosts_file_install_group_to_populate: "" hosts_file_login_group_to_populate: "" hosts_file_extra_group_to_populate: ""
Using the custom inventory script to only write kickstart templates once per child group of a group by:
hosts_file_group_to_populate: "pxe_bootable_nodes" hosts_file_inventory_location: "hosts"
See defaults/main.yml for some examples
-
currently tightly integrated with dhcp_server and pxe_bootstrap
Including an example of how to use your role (for instance, with variables passed in as parameters) is always nice for users too:
- hosts: servers
roles:
- { role: ansible-role-pxe_config }
The tests we run are in here: https://github.com/CSCfi/ansible-role-pxe_config/tree/master/tests
They generate a hosts file that looks like this:
10.1.100.1 io1 io1.int.fgci.csc.fi 10.2.100.1 io1-ib io1-ib.int.fgci.csc.fi 10.1.1.6 io-admin io-admin io-admin.int.fgci.csc.fi io-admin.int.fgci.csc.fi 10.1.1.8 io-install io-install io-install.int.fgci.csc.fi io-install.int.fgci.csc.fi
MIT