netplan: Install and configure netplan
netplan::config: Generate netplan YAML files
Manages the installation of netplan and controls global options like whether to purge unmanaged files.
include netplanclass { netplan:
purge_configs => true,
}class { netplan:
purge_configs => true,
purge_ignore => '90-NM*'
}The following parameters are available in the netplan class:
Data type: Array
List of packages to install
Default value: ['netplan.io']
Data type: Boolean
Whether to install the list of package dependencies or not
Default value: true
Data type: Boolean
Whether to apply the netplan configuration during the agent run or not
Default value: true
Data type: Boolean
Whether to purge un-managed netplan YAML files under /etc/netplan
Default value: false
Data type: Optional[String]
Match files to ignore when purging configs under /etc/netplan.
Uses the ignore attribute of the native puppet file resource.
Default value: undef
Data type: Optional[Hash]
An optional hash of netplan configurations supplied via hiera
Default value: undef
Create netplan YAML files from a Hash of data.
netplan::config { 'example-config':
settings => {
version => 2,
renderer => networkd,
ethernets => {
eth0 => {
dhcp4 => true,
},
},
},
}The following parameters are available in the netplan::config defined type:
Data type: Enum['present','absent']
Ensure presence/absence of the resource
Default value: 'present'
Data type: String
The filename to use for the generated YAML file
Default value: $title
Data type: Variant[String, Integer[0]]
The string/number prefixed to the generated YAML file
Default value: 90
Data type: Stdlib::Absolutepath
The absolute path of the genrated YAML file
Default value: "/etc/netplan/${priority}-${file_name}.yaml"
Data type: String
The file permissions for the generated YAML file
Default value: '0600'
Data type: String
The file header for the generated YAML file
Default value: '# This file is managed by Puppet. DO NOT EDIT.'
Data type: Hash
A hash of netplan settings to be included in the generated YAML file
Default value: {}