pxe_install
Version information
This version is compatible with:
- Puppet Enterprise 2023.8.x, 2023.7.x, 2023.6.x, 2023.5.x, 2023.4.x, 2023.3.x, 2023.2.x, 2023.1.x, 2023.0.x, 2021.7.x, 2021.6.x, 2021.5.x, 2021.4.x, 2021.3.x, 2021.2.x, 2021.1.x, 2021.0.x
- Puppet >= 7.0.0 < 9.0.0
- , , , , ,
Tasks:
- create_password
- maintain_netinstaller
Start using this module
Add this module to your Puppetfile:
mod 'tomkrieger-pxe_install', '0.3.10'
Learn more about managing modules with a PuppetfileDocumentation
pxe_install
Table of Contents
Description
The pxe_install module helps setting up a Linux based install server. It takes care about configuring Apache webserver, DHCP server and TFTP server. It creates all necessary entries from Hiera data including partitioning.
Setup
The module needs definitions for each server to be installed and can use configurable default values. It is highly recommended to have all this data in Hiera configuration files.
What pxe_install affects
This install server modules installs packages to run a dhcp and tftp server. If you have already a dhcp server running, keep in mind that a server is broadcasting during install and you might receive a wrong DHCP answer. As during the install process some files need to be downloaded to the installing server, this module configures an Apache webserver with all needed vhosts.
Setup Requirements
PXE bootstrapping servers need network installers for the opeating systems. This module does not maintain the tftpboot directory to have all needed files available. You must take care about these files yourself. But this module includes a plan to upload and install network boot configurations for Debiam, Ubuntu and CentOS.
This module configures an Apache webserver with http and https access. The needed SSL certifiates have to be installed have to be available on the host.
Beginning with pxe_install
It is highly recommended, to add all configuration into the install server's Hiera node definition file. Here's a short example how you can organize this in your control repository. The example is reduced to the parts regarding the PXE install server.
Your Hiera configuration file hiera.yaml
can look like this.
---
version: 5
defaults:
datadir: data
data_hash: yaml_data
hierarchy:
- name: "Secret data: per-node, common"
lookup_key: eyaml_lookup_key
paths:
- "common.eyaml"
options:
pkcs7_private_key: <your private key>
pkcs7_public_key: <your public key>
- name: "PXE install server configurations"
globs:
- "pxe/*.yaml"
- "pxe/nodes/*.yaml"
- name: "Other YAML hierarchy levels"
path: "common.yaml"
This needs the following lookup configuration in your common.yaml
file.
---
lookup_options:
'^pxe_install::machines$':
merge:
strategy: deep
'^pxe_install::defaults$':
merge:
strategy: deep
'^pxe_install::services$':
merge:
strategy: deep
The folder structure of your conreol repository should loo like this to get the above configurations work.
control-repo/
├── data/ # Hiera data directory.
│ ├── nodes/ # Node-specific data goes here.
│ ├── pxe/ # Global PXE install data goes here.
│ ├── pxe/nodes/ # Node configutation for PXE installs goes here.
│ └── common.yaml # Common data goes here.
├── manifests/
│ └── site.pp # The “main” manifest that contains a default node definition.
├── scripts/
│ ├── code_manager_config_version.rb # A config_version script for Code Manager.
│ ├── config_version.rb # A config_version script for r10k.
│ └── config_version.sh # A wrapper that chooses the appropriate config_version script.
├── site-modules/ # This directory contains site-specific modules and is added to $modulepath.
│ ├── profile/ # The profile module.
│ └── role/ # The role module.
├── LICENSE
├── Puppetfile # A list of external Puppet modules to deploy with an environment.
├── README.md
├── environment.conf # Environment-specific settings. Configures the modulepath and config_version.
└── hiera.yaml
Usage
he simpliest way to use this module is to maintain the full configuration in a Hiera file. In this case using this modules is just to
include ::pxe_install
The module will take care about for each configured node:
- kickstart files for RedHat/CentOS
- preseed files for Debian/Ubuntu
- dhcp entries
- tftp configuration files per node
Install server definitions
The module has several configuration options. Please look into the REFERENCE.md file. The data folder contains a common.yaml
file showing some example configurations.
The install server can provide a DHCP and a TFTP service. These services have their configuration located in the pxe_install::services
part.
Services
The follwong services are only configured when defined in the services configuration section.
pxe_install::services:
samba:
...
tftpd:
...
dhcpd:
...
TFTP service
For the tftp service please provide the packages and service name to use. The group
option is only needed on RedHat/CentOS operating systems.
If you do not enable this service you have to take care yorself to create the TFTP entries.
Configuration example:
tftpd:
manage_tftpboot: true
packages:
- tftp-server
- xinetd
packages_ensure: installed
port: 69
user: root
group: root
directory: '/var/lib/tftpboot'
pxelinux: 'pxelinux.cfg'
address: 10.0.0.2
tftpserverbin: /usr/sbin/in.tftpd
service: xinetd
service_ensure: running
service_enable: true
DHCP service
The DHCP service can serve as a full DHCP service. This means you can define static DHCP entried for all nodes regardless if these nodes need install services. The dhcp service configuration has a hosts
part where you can configure all these nodes.
If you do not enable the DHCP service, you have to take care about the DHCP entries yourself.
Configuration example:
dhcpd:
interfaces:
- eth0
omapiport: 7911
default_lease_time: 43200
max_lease_time: 86400
ddns_update_style: none
domain_names:
- localdomain
dns_servers:
- 10.0.0.62
- 10.0.0.63
ntp_servers: ['none']
next_server: 10.0.0.2
logfacility: local7
option_code150_label: pxegrub
option_code150_value: text
default_filename: pxelinux.0
hosts:
test:
mac: 00:11:22:33:44:55
ip: 10.0.0.99
max_lease_time: 86400
pools:
internal:
network: 10.0.0.0
mask: 255.255.255.0
range:
- '10.0.0.180 10.0.0.199'
gateway: 10.0.0.12
SAMBA service
The SAMBA service is needed to kickstart Windows installation. Windows will download all needed files from here during unattended installation.
If you do not enable this service please take care to provide a SAMBA share needed for the Windows installation.
Configuration example:
samba:
package_ensure: installed
os_level: 50
workgroup: WORKGROUP
wins_server: 10.0.0.75
server_string: 'Install server'
netbios_name: 'wonderbox'
map_to_guest: 'Bad User'
syslog: '3'
firewall_manage: false
interfaces:
- eth0
hosts_allow:
- '127.'
hosts_deny:
- 'ALL'
local_master: yes
preferred_master: no
shares:
install:
comment: 'Windows install media'
path: /var/lib/tftpboot/windows
browseable: true
writable: false
public: yes
guest_ok: yes
Node configuration
The node configuration includes general settings for a node like the root password, os type, keyboard, language and timezone settings. The following table describes the available configiration options. If a value is available as default value it is marked with yes in the default value column.
Section | Config option | Comment | Default value |
---|---|---|---|
global | ensure | can have the values present or absent |
- |
rootpw | The sha512 encrypted root password. You can create this password by using a Python one liner. See below the example | yes | |
timezone | Timezone setting, e. g. Europe/Berlin | yes | |
ostype | The OS type. Valid values are debian , ubuntu , Alma , Rocky and CentOS |
- | |
osversion | The osversion is necessary for CentOS like only and is the major number of the OS to install, e. g. 8. For Debian OS the osversion is the suite to install like e. g. 'oldstable'or 'stable'. |
stable for Debain, no value for other OSes. | |
keyboard | The keyboard layout to use, e. g. de(Macintosh, no dead keys) . Please make sure to use a keyboard layout supported by the OS you install. For Windows you need to set a value consisting of the input locale and the locate e. g. 0409:00000407 which is German keyboard layout and en-US locale. |
yes | |
keymap | The keymap used for debian and ubuntu |
yes | |
language | The language used for the installer. For CentOS it is set to the language and the flavour, e. g. en_US. For Debian and Ubuntu it is a two character language setting, e. g. en. | yes | |
locale | The locale setting for Linux e. g. en-US.UTF-8 or for Windows e. g. en-US | yes | |
path | For Debian until version 10, Ubuntu and Windows nodes, there is a path needed which points to the boot screen files within the tftpboot directory. If you do not set this parameter it will be set to <prefix>/boot-screens by default. If you do not want to set a path, set it to the string none . |
- | |
packages | The packages to additionally install. This parameter has only effect on CentOS, Debian and Fedora installations. Otherwise it is ignored. Please make sure to use a string with blank separated packages for Debian and an array for Fedora or CentOS. | yes | |
stage2 | Yhe tftpboot stage2 file | - | |
defaultdesktop | The default desktop to install. | - | |
startxonboot | Boolean to start X during boot. | - | |
xconfig | Boolean to control if X is configured. | - |
Node network configuration
The network configuration describes how the network of a node should be setup. You need to give the mac address, ip address and so on. It is important to specify the correct ksdevice
. That is the network device the kickstart/preseed will use. Be careful as this device is dependant on the network driver settings in VMWare. The examples in the examples
folders common.yaml
file show all possible configurations.
Section | Config option | Comment | Default value |
---|---|---|---|
network | mac | The MAC address of the node | - |
prefix | The path within the tftpboot directory to find the boot kernel and initial ram disk. | - | |
filename | The pxefile to load. A full path can be used. For windows winpe.ipxe is used as default. |
yes | |
fixedaddress | The IP address the host should use | - | |
ksdevice | The network device used for kickstart | - | |
gateway | The default gateway to use | - | |
netmask | The netmask | - | |
dns | Array of dns servers to configure | yes |
Node user configuration
Ubuntu/Debian need a unprivileded user to be able to login and to escalate your privileges to root
after installation. This user can be defined in the user
section.
Section | Config option | Comment | Default value |
---|---|---|---|
user | fullname | The full name of the user | yes |
username | The username, e. g. ppt4711 | yes | |
password | The password has to be encrypted as the operating system will do, so e. g. MD5 or SHA512 encrypted. See the explanations below on how to create such a password. | yes |
One liner to create a SHA512 encryped password:
python3 -c 'import crypt; print(crypt.crypt("your password here", crypt.mksalt(crypt.METHOD_SHA512)))'
Node parameter configuration
The parameter section nows about 4 parameter. Therse parameter control how the node will be registered in the Puppet master. If needed, Puppet agent installation can be skipped.
Section | Config option | Comment | Default value |
---|---|---|---|
parameter | env | The environment configuration for the Puppet agent. | - |
role | The role the node will get. This value will be added to the agent certificate as trusted fact pp_role . |
- | |
dc | The datacenter the node runs in. This value goes as trusted fact pp_datacenter into the node's certificate. |
- | |
agent | This option accepts y or n . If set to n no Puppet agent will be installed. Default value is y . |
- | |
orgid | The organization id for Redhat CDN install and subscription manager. | - | |
actkey | The acvtivation key for Redhat CDN install and subscription manager. | - | |
rhcdn | Set to y if Redhat CDN should be used. Otherwiese the URL would be used. |
- |
Node partition configuration
Ubuntu/Debian use different methods to define partition tables. And for Ubuntu/Debian an order
is needed as the entries in the preseed file need to be defined in that order. Please see the example ct03
in the common.yaml
file in the examles
folder.
The partion options do not support all possibilites for Debian/Ubuntu or RedHat/CentOS. Only these things I needed have been implemented in the templated for partitioning. These templates can easily be extended to e. g. make software raids possible.
The partitioning information for each node goes into the partitioning
section. Debian/Ubuntu and RedHat/CentOS need different options for partitioning. These options will be described in the following.
There are thre ways to define partitioning:
- add a partition table directly to the node
- use an operation system default you can have in the
defaults
part of the install server. In this case you just omit the partitioning information in the node definitions. - create a partition table and use it with the
partitiontable
reference instead ofpartitioning
in a node definition and define this partition table for multi use in the install server defaults.
RedHat/CentOS
Here're some small examples:
partitioning:
"/boot":
type: part
fstype: ext3
size: 2048
primary: true
ondisk: sda
"pv.01":
type: pvol
size: 1000
grow: true
primary: true
ondisk: sda
"vgos":
type: volgroup
pvol: pv.01
"/usr":
type: logvol
vgname: vgos
diskname: lvol_usr
size: 8192
fstype: ext4
The available options:
title
: The mountpoint, physical or logival volume or the volume group.type
: The type of the partition. Currently it accepts the following values:- part: physical partition
- pvol: physical volume
- volgroup: volume group
- logvol: logical volume
fstype
: the filesystem type, e. g. ext4size
: The size of the partition in megabytes.primary
: If set to true, the partition will be a rimary partition. If this option is not given,false
will be the default.ondisk
: the disk device to put the partition on. This is mandatory for physical partitions and physical volumes.grow
: If set totrue
the partition will be grown to the maximal possible size. The size value is the minimal size in that case. Default isfalse
.diskname
: The label for the disk, e. g.lvol_var
Ubuntu/Debian
A difference is that an order
is needed for the concat fragments. Otherwirse the partition table will not work during preseed. If you have more than one disk in your partitioning infrmation, the partitioning is scanned before to create a partman/auto-disk
entry with all availabe disk devices.
Here're some small examples:
partitioning:
"/boot":
min: 1024
prio: 1024
max: 1024
fstype: ext3
primary: true
bootable: true
label: boot
method: format
device: /dev/sda
order: 405
"vgos":
min: 100
prio: 1000
max: 1000000000
fstype: ext4
primary: true
bootable: false
method: lvm
device: /dev/sda
vgname: vgos
order: 406
The available options:
title
: The mountpoint, physical or logival volume ot the volume group.min
: is the minimal allowed size of the partition in megabytes. It is rounded to cylinder size, so if you makeminimal size
to be 20 MB and the cylinder size is 12MB, then it is possible for the partition to be only 12MB. These sizes may also be given as a percentage, which makes the size be that percentage of the system's total RAM, or (as of partman-auto 87) as a number plus a percentage (e.g. "2000+50%"), which makes the size be that number plus that percentage of the system's total RAM.prio
: is some size usually betweenminimal size
andmaximal size
. It determines the priority of this partition in the contest with the other partitions for size. Notice that ifpriority
is too small (relative to the priority of the other partitions) then this partition will have size close tominimal size
. That's why it is recommended to give small partitions apriority
larger than theirmaximal size
.max
: is the maximal size for the partition, i.e. a limit size such that there is no sense to make this partition larger. The special value "-1" is used to indicate unlimited partition size.fstype
: the filesystem type, e. g. ext4primary
: acceptstrue
orfalse
and makes a partition a primary partitiobootable
: acceptstrue
orfalse
and makes a partition bootabledefaultignore
: Used to void a partition definition so that it is ignored in the default case. That is to say it will be valid in the LVM case.method
: how to deal with the partition. Can have the following values:- format: format the partiotn
- lvm: for volume groups
- swap: for swap partitions
invg
: the volume group the logical volume will be created informat
: acceptstrue
orfalse
. If true the partition will be formatted during installation.label
: a label for the partition e. g.boot
.device
: the disk device to usevgname
: the name of the volume grouplvname
: the name of the logival volume e. g.lvol_boot
.order
: the order in the concatenated preseed file. Should be ascending and contain no duplicates. Starting value for the first entry should be405
.
Ubuntu 22
Starting with Ubuntu 22 autoinstall
is used for installing Ubuntu servers. You need the server iso file. Ubuntu 22 autoinstall brings a huge change to paritioning. You can use all the settings available from the Ubuntu autoinstall. All key/value pairs are passed directly from the yaml file to the autoinstall file. The order
field will be removed and is used for content::fragment ordering. So please make sure to have no duplicates in your partitioning.
Below there's a short example how partitioning can look like.
partitioning:
- path: /dev/sda
id: sda
ptable: msdos
wipe: superblock-recursive
preserve: false
name: main_disk
type: disk
grub_device: true
order: 405
- device: sda
size: 2G
flag: bios_grub
preserve: false
id: sda1
grub_device: false
type: partition
number: 1
order: 406
- device: sda
size: -1
wipe: superblock
preserve: false
grub_device: false
number: 2
type: partition
id: sda2
order: 408
- name: vgos
devices:
- sda2
preserve: false
type: lvm_volgroup
id: lvm_volgroup-vgos
order: 409
- name: lvol_root
volgroup: lvm_volgroup-vgos
size: 4G
wipe: superblock
preserve: false
type: lvm_partition
id: lvm_partition-0
order: 410
Default values
To simplify configuration of nodes, there are several default values that are avaiable in the params.pp
class. You can overwrite these defaults in your Hiera configuration.
The following default values are available:
Section | Value |
---|---|
Global configuration | rootpw |
tmezone | |
keymap | |
language | |
country | |
locale | |
loghost | |
logport | |
domain | |
Network configuration | pxefile |
User configuration | fullname |
username | |
password | |
Disk partitioning | bootable |
primary | |
Partition tables | partitioning |
partitiontable |
Default partition tables are available for Debian like and Redhat like operation systems. You can define your own default partition tables. This is useful if you want to create e. g. a three node cluster and all three nodes should have an identcal configuration.
Minimal node configuration examples
The following example uses all available default values and the node definition only contains the necessary definitions. The example makes use of a defined partition table in the install server defaults.
example:
ensure: present
ostype: ubuntu
network:
mac: 00:11:22:33:44:55
prefix: ubuntu/18.04/amd64
fixedaddress: 10.0.0.132
ksdevice: eth0
gateway: 10.0.0.1
netmask: 255.255.255.0
parameter:
env: production
role: ubuntu
dc: home
agent: y
partitiontable: example
If you want to split your configuration into multiple files and keep all install server related stuff in a dedicated folder in your Hiera data folder, you can refer to the following configuration examples. Please keep in mind that you need to configute the Hiera merge options in the common.yaml
file as described above.
A node definition tomtest.yaml
---
pxe_install::machines:
tomtest:
ensure: present
ostype: ubuntu
network:
mac: 00:50:56:91:ba:68
prefix: ubuntu/18.04/amd64
fixedaddress: 10.0.0.132
ksdevice: eth0
gateway: 10.0.0.4
netmask: 255.255.255.0
parameter:
env: production
role: ubuntu
dc: home
agent: y
partitiontable: tomtest2
The partition table definition default_partitioning.yaml
---
pxe_install::defaults:
partitioning:
tomtest2:
"/boot":
min: 2048
prio: 2048
max: 2048
fstype: ext3
primary: true
bootable: true
label: boot
method: format
device: /dev/sda
order: 405
"vgos":
min: 100
prio: 1000
max: 1000000000
fstype: ext4
primary: true
method: lvm
device: /dev/sda
vgname: vgos
order: 406
"swap":
min: 4096
prio: 4096
max: 4096
fstype: linux-swap
invg: vgos
method: swap
lvname: lvol_swap
order: 407
"/":
min: 8192
prio: 8192
max: 8192
fstype: ext4
invg: vgos
lvname: lvol_root
method: format
label: root
order: 408
You can find more examples in the spec/fixtures/hiera/hiera_data/pxe
folder.
Tasks
maintain_netinstaller
:
This task can be called directly nd it will download the needed net installer image and install the files into the tftpboot directory. Here's an example for an CentOS 8 netinstaller URL: http://centos.intergenia.de/8-stream/isos/x86_64/CentOS-Stream-8-x86_64-latest-boot.iso
create_password
:
This task helps you to create SHA512 encrypted passwords. It uses the above mentioned Python code. This task has to run on the Puppet primary server.
Unit tests
Unit tests are mainly covered by the main pxe_install_spec.rb
file.
Limitations
This module was initially written for my private install server. Therefore it is limited to what I needed. Especially paritioning is currentlylimited to partitions and logical LVM volumes.
Contributors
Special thanks to my collegue Kevin for his support with Windows PXE installation.
Known issues
The tftp-hpa
package on Debian and Ubuntu servers causes failures during installation if the /tmp
directory has the noexec
flag set. The installation works regardless. The next puppet run will finish without problems and the tftp server works. If you want to avoid this issue it is possible to remove the noexec
flag from the /tmp
directory and add it again after the puppet run has finished.
Reference
Table of Contents
Classes
Public Classes
pxe_install
: PXE Install server
Private Classes
pxe_install::apache
: Configure webserver for install serverpxe_install::dhcp
: Setup DHCP serverpxe_install::params
: Default parameterspxe_install::syslinux
: Download syslinux archivepxe_install::tftp
: Setup ftp serverpxe_install::winipxe
: Install windows ipxe files
Defined types
Public Defined types
pxe_install::parent_dirs
: Create directories recursivly
Private Defined types
pxe_install::kickstart
: Create kickstart filepxe_install::partitioning::debian
: Create a partion table for Debian systemspxe_install::partitioning::redhat
: ACreate partitioning for redhat/CentOPS systemspxe_install::partitioning::ubuntu
: Create a partion table for Ubuntu systemspxe_install::samba::host
: Create a host entry for a Windows nodepxe_install::samba::unattend
: create unattended boot filepxe_install::tftp::host
: Create a tftp server entry for a host.
Functions
get_partition_devices
: get_partition_devices.rb Examin partitioning information of Debian/Ubuntu hosts and get all used disk devicespxe_install::hex_ip
: Convert a ip from digits into hex.
Tasks
create_password
: Outputs a SHA512 encrypted password for use with node installation.maintain_netinstaller
: Maintain CentOS/Ubuntu/Debian net installer files
Classes
pxe_install
Set up an PXE install server with dhcp, tftp and webserver for serving files
Examples
include pxe_install
Parameters
The following parameters are available in the pxe_install
class:
installserverip
installserver
repo_server
repo_server_ip
repos_dir
repos_url
scriptdir
scripturl
kickstart_dir
kickstart_url
puppetmaster
puppetmasterip
services
machines
status_allow_from
enabled
ssl_cert
ssl_key
ssl_chain
ssl_certs_dir
documentroot
create_aliases
challenge_password
add_hosts_entries
install_curl
install_unzip
syslinux_url
syslinux_name
syslinux_version
ipxefile
mirrors
defaults
purge_apache_configs
installserverip
Data type: String
The ip of the install server
installserver
Data type: String
Hostname of the install server
repo_server
Data type: String
Hostname of the server hosting the package repositories
repo_server_ip
Data type: String
IP of the server hosting the package repositories
repos_dir
Data type: Stdlib::Unixpath
Directory location of the package repositories
repos_url
Data type: String
URI where the pacjaqges can be found on the repo server
scriptdir
Data type: Stdlib::Unixpath
Directory location where to cfreate scripts and prepared files
scripturl
Data type: String
URL where to find the scripts
kickstart_dir
Data type: Stdlib::Unixpath
Directory location for the kickstart/preseed files
kickstart_url
Data type: String
Url where to download the kickstart/preseed files
puppetmaster
Data type: Optional[String]
The hostname of the Puppet master server
Default value: undef
puppetmasterip
Data type: Optional[String]
The ip of the Puppet master server
Default value: undef
services
Data type: Optional[Hash]
Hash with services to configure. Valid are dhcp and tftp. Each service is a hash of how to configure that service.
Default value: undef
machines
Data type: Optional[Hash]
Hash with all machines to get installed. Each entry i a whole description of a machine with ips, partitions and so on.
Default value: undef
status_allow_from
Data type: Array
Allow Apache status URLs from these ips
Default value: ['127.0.0.1']
enabled
Data type: Boolean
Installserver is enbaled or not
Default value: true
ssl_cert
Data type: String
Location of the SSL certificate for the webserver to use. he file has to exist on the install server.
Default value: '/etc/pki/httpd/repos.example.com/repos.example.com.cer'
ssl_key
Data type: String
Location of the SSL key for the webserver to use. he file has to exist on the install server.
Default value: '/etc/pki/httpd/repos.example.com/repos.example.com.key'
ssl_chain
Data type: String
Location of the SSL certificate chain for the webserver to use. he file has to exist on the install server.
Default value: '/etc/pki/httpd/repos.example.com/fullchain.cer'
ssl_certs_dir
Data type: String
Directory where all files for the cdertificates reside.
Default value: '/etc/pki/httpd/repos.example.com/'
documentroot
Data type: String
Document root for the webserver.
Default value: '/var/www/html'
create_aliases
Data type: Boolean
Create webserver aliases
Default value: true
challenge_password
Data type: Sensitive[String]
Sensitive challenge password for auto signing cert requests.
add_hosts_entries
Data type: Boolean
Add install server and puppet server to /etc/hosts file.
Default value: false
install_curl
Data type: Boolean
Install curl package
Default value: $pxe_install::params::install_curl
install_unzip
Data type: Boolean
Install unzip package
Default value: $pxe_install::params::install_unzip
syslinux_url
Data type: Stdlib::HTTPSUrl
The url where to download the syslinux archive.
Default value: $pxe_install::params::syslinux_url
syslinux_name
Data type: String
Ther name of the archive.
Default value: $pxe_install::params::syslinux_name
syslinux_version
Data type: String
The version of the archive.
Default value: $pxe_install::params::syslinux_version
ipxefile
Data type: Stdlib::HTTPUrl
The url to download the ipxe file.
Default value: $pxe_install::params::ipxefile
mirrors
Data type: Hash
Hash with mirror definitions.
Default value: $pxe_install::params::mirrors
defaults
Data type: Hash
Default values.
Default value: $pxe_install::params::defaults
purge_apache_configs
Data type: Boolean
Boolean to indicate that all Apache configurations not maintained by the Apache Puppet module should be deleted.
Default value: false
Defined types
pxe_install::parent_dirs
Create all missing directories
}
Examples
pxe_installarent_dirs{ 'create script dir':
dir_path => '/var/www/scripts',
Parameters
The following parameters are available in the pxe_install::parent_dirs
defined type:
dir_path
Data type: Stdlib::Unixpath
The directories to be created.
Functions
get_partition_devices
Type: Ruby 4.x API
get_partition_devices.rb Examin partitioning information of Debian/Ubuntu hosts and get all used disk devices
get_partition_devices(Hash $partitioning)
get_partition_devices.rb Examin partitioning information of Debian/Ubuntu hosts and get all used disk devices
Returns: String
partitioning
Data type: Hash
pxe_install::hex_ip
Type: Puppet Language
Convert a ip from digits into hex.
pxe_install::hex_ip(String $ip)
The pxe_install::hex_ip function.
Returns: String
IP in hey format
ip
Data type: String
The ip to convert, e. g. 10.0.0.1
Tasks
create_password
Outputs a SHA512 encrypted password for use with node installation.
Supports noop? false
Parameters
password
Data type: String[1]
The password to encrypt
maintain_netinstaller
Maintain CentOS/Ubuntu/Debian net installer files
Supports noop? false
Parameters
tftp_basedir
Data type: String[1]
The base directory of the tftpd server where the net installer files go to.
archive_url
Data type: String[1]
Where to download he net installer from.
os
Data type: Enum[centos,ubuntu,debian,fedora,alma,rocky,redhat]
The operating system.
os_version
Data type: String[1]
The operting system version, depending on the OS.
os_subversion
Data type: Optional[String[1]]
The operating system subversion for CentOS like 'u9'.
What are tasks?
Modules can contain tasks that take action outside of a desired state managed by Puppet. It’s perfect for troubleshooting or deploying one-off changes, distributing scripts to run across your infrastructure, or automating changes that need to happen in a particular order as part of an application deployment.
Tasks in this module release
Changelog
All notable changes to this project will be documented in this file.
0.3.10
- Added support for Ubuntu 22.04 autoinstall
- updated decendencies to their latest versions
0.3.9
- Added UEFI boot
- Added support for Rocky Linux 9 and Alma Linux 9
- Minor bug fixes
0.3.8
- Added Rdedhat CDN install (new parameters orgid and actkey)
0.3.7
- Added Fedora to maintain_installer task
- Additional packages are configurable for Debian, CentOS and Fedora
- Added Alma Linux and Rocky Linux
0.3.6
- Added unattended install configurations for Windows 2019 Server
- Added Windows install script template
- Create directory structure within tftpboot directory
- configurable windows locale and input locale settings
0.3.5
install is deprecated for redhat 8 kickstarts and will no longer be included into Redhat 8 kickstarts.
0.3.4
not published
0.3.3
Enable Debian and Ubuntu preseeds with more than one disk. Introduced defaultignore flag for DEbain und Ubuntu preseeds.
0.3.2
- fixed a proplem with Debian preseed files
0.3.1
- broken, not published
v0.3.0
- added Samba support to enable PXE installation of Windows
- added Windows PXE installation support, create dhcp entries and tftp entries
- added support for uefi and bios installations
- manage tftpboot directory, download syslinux and wimboot
v0.2.4
- fixed an issue with creating necessary directories
v0.2.3
- added support for Debian 10
v0.2.2
- added unit test hiera configuration
- removed old unused files
v0.2.1
- make filename for DHCP pxe boot configurable
v0.2.0
- Added support for Ubuntu/Debian
- removed some ununsed or unnecessary code
- make node config much easier as using same options for Redhat like and Debian like nodes
v0.1.0
Initial release, never published
Dependencies
- puppetlabs-stdlib (>= 7.0.0 < 10.0.0)
- puppetlabs-concat (>= 6.0.0 < 10.0.0)
- ipcrm-echo (>= 0.1.6 < 1.0.0)
- puppet-dhcp (>= 5.0.0 < 6.0.0)
- puppetlabs-apache (>= 6.0.0 < 11.0.0)
- rehan-samba (>= 2.0.0 < 3.0.0)
- puppetlabs-augeas_core (>= 1.3.0 < 2.0.0)
- puppet-archive (>= 7.0.0 < 8.0.0)
Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "{}" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. Copyright 2019 puppet-modules Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.