Skip to content

Commit

Permalink
feat(config): add default configuration files
Browse files Browse the repository at this point in the history
  • Loading branch information
SchoolGuy committed Nov 21, 2023
1 parent f7d278c commit 957c53e
Show file tree
Hide file tree
Showing 25 changed files with 817 additions and 177 deletions.
2 changes: 1 addition & 1 deletion cobbler/config/file.sls
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ include:
cobbler-config-file-file-managed:
file.managed:
- name: {{ cobbler.config }}
- source: {{ files_switch(['example.tmpl'],
- source: {{ files_switch(['settings.yaml.jinja'],
lookup='cobbler-config-file-file-managed'
)
}}
Expand Down
6 changes: 0 additions & 6 deletions cobbler/files/default/example.tmpl

This file was deleted.

11 changes: 0 additions & 11 deletions cobbler/files/default/example.tmpl.jinja

This file was deleted.

20 changes: 20 additions & 0 deletions cobbler/files/default/modules.conf.jinja
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Cobbler module configuration file
# Documentation: https://cobbler.readthedocs.io/en/latest/cobbler-conf.html#modules-conf

# THIS FILE IS MANAGED BY SALTSTACK!

[authentication]
module = authentication.configfile
hash_algorithm = sha3_512

[authorization]
module = authorization.allowall

[dns]
module = managers.bind

[dhcp]
module = managers.isc

[tftpd]
module = managers.in_tftpd
6 changes: 6 additions & 0 deletions cobbler/files/default/mongodb.conf.jinja
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Cobbler MongoDB configuration file
# THIS FILE IS MANAGED BY SALTSTACK!

[connection]
host = localhost
port = 27017
226 changes: 226 additions & 0 deletions cobbler/files/default/settings.yaml.jinja
Original file line number Diff line number Diff line change
@@ -0,0 +1,226 @@
# Cobbler settings file
# THIS FILE IS MANAGED BY SALTSTACK!
# This config file is in YAML 1.2 format; see "http://yaml.org".

auto_migrate_settings: {{ cobbler['auto_migrate_settings']|yaml_encode }}
allow_duplicate_hostnames: false
allow_duplicate_ips: false
allow_duplicate_macs: false
allow_dynamic_settings: false
anamon_enabled: false
authn_pam_service: "login"
auth_token_expiration: 3600
autoinstall_snippets_dir: /var/lib/cobbler/snippets
autoinstall_templates_dir: /var/lib/cobbler/templates
boot_loader_conf_template_dir: "/etc/cobbler/boot_loader_conf"
bootloaders_dir: "/var/lib/cobbler/loaders"
bootloaders_formats:
aarch64:
binary_name: grubaa64.efi
arm:
binary_name: bootarm.efi
arm64-efi:
binary_name: grubaa64.efi
extra_modules:
- efinet
i386-efi:
binary_name: bootia32.efi
i386-pc-pxe:
binary_name: grub.0
mod_dir: i386-pc
extra_modules:
- chain
- pxe
- biosdisk
i686:
binary_name: bootia32.efi
IA64:
binary_name: bootia64.efi
powerpc-ieee1275:
binary_name: grub.ppc64le
extra_modules:
- net
- ofnet
x86_64-efi:
binary_name: grubx86.efi
extra_modules:
- chain
- efinet
bootloaders_modules:
- btrfs
- ext2
- xfs
- jfs
- reiserfs
- all_video
- boot
- cat
- configfile
- echo
- fat
- font
- gfxmenu
- gfxterm
- gzio
- halt
- iso9660
- jpeg
- linux
- loadenv
- minicmd
- normal
- part_apple
- part_gpt
- part_msdos
- password_pbkdf2
- png
- reboot
- search
- search_fs_file
- search_fs_uuid
- search_label
- sleep
- test
- "true"
- video
- mdraid09
- mdraid1x
- lvm
- serial
- regexp
- tr
- tftp
- http
- luks
- gcry_rijndael
- gcry_sha1
- gcry_sha256
syslinux_dir: {{ cobbler['bootloaders']['syslinux']['location']|yaml_encode }}
syslinux_memdisk_folder: {{ cobbler['bootloaders']['syslinux']['memdisk_location']|yaml_encode }}
syslinux_pxelinux_folder: {{ cobbler['bootloaders']['syslinux']['pxelinux_location']|yaml_encode }}
grub2_mod_dir: {{ cobbler['bootloaders']['grub2']['mod_location']|yaml_encode }}
bootloaders_shim_folder: {{ cobbler['bootloaders']['shim']['location']|yaml_encode }}
bootloaders_shim_file: {{ cobbler['bootloaders']['shim']['file']|yaml_encode }}
bootloaders_ipxe_folder: {{ cobbler['bootloaders']['ipxe']['location']|yaml_encode }}
build_reporting_enabled: false
build_reporting_sender: ""
build_reporting_email: [ 'root@localhost' ]
build_reporting_smtp_server: "localhost"
build_reporting_subject: ""
build_reporting_ignorelist: []
cheetah_import_whitelist:
- "random"
- "re"
- "time"
- "netaddr"
createrepo_flags: "-c cache -s sha"
autoinstall: "default.ks"
default_name_servers: []
default_name_servers_search: []
default_ownership:
- "admin"
default_password_crypted: "$1$mF86/UHC$WvcIcX2t6crBz2onWxyac."
default_template_type: "cheetah"
default_virt_bridge: xenbr0
default_virt_file_size: 5.0
default_virt_ram: 512
default_virt_type: xenpv
enable_ipxe: {{ cobbler['bootloaders']['ipxe']['enabled']|yaml_encode }}
enable_menu: {{ cobbler['menu']['enabled']|yaml_encode }}
http_port: 80
kernel_options: {}
ldap_server: "ldap.example.com"
ldap_base_dn: "DC=example,DC=com"
ldap_port: 389
ldap_tls: true
ldap_anonymous_bind: true
ldap_search_bind_dn: ''
ldap_search_passwd: ''
ldap_search_prefix: 'uid='
ldap_tls_cacertfile: ''
ldap_tls_keyfile: ''
ldap_tls_certfile: ''
ldap_tls_cacertdir: ''
ldap_tls_cipher_suite: ''
ldap_tls_reqcert: ''
mgmt_classes: []
mgmt_parameters:
from_cobbler: true
puppet_auto_setup: false
sign_puppet_certs_automatically: false
puppetca_path: "/usr/bin/puppet"
remove_old_puppet_certs_automatically: false
puppet_server: 'puppet'
puppet_version: 2
puppet_parameterized_classes: true
manage_dhcp: {{ (cobbler['dhcp']['v4'] or cobbler['dhcp']['v6'])|yaml_encode }}
manage_dhcp_v6: {{ cobbler['dhcp']['v6']|yaml_encode }}
manage_dhcp_v4: {{ cobbler['dhcp']['v4']|yaml_encode }}
next_server_v4: {{ cobbler['nextserver']['v4']|yaml_dquote }}
next_server_v6: {{ cobbler['nextserver']['v6']|yaml_dquote }}
manage_dns: {{ cobbler['dns']['enabled']|yaml_encode }}
bind_chroot_path: ""
bind_zonefile_path: {{ cobbler['dns']['bind']['location']|yaml_encode }}
bind_master: {{ cobbler['dns']['bind']['master']|yaml_encode }}
manage_forward_zones: []
manage_reverse_zones: []
manage_tftpd: {{ cobbler['tftp']['enabled']|yaml_encode }}
tftpboot_location: {{ cobbler['tftp']['location']|yaml_encode }}
manage_rsync: {{ cobbler['rsync']['enabled']|yaml_encode }}
power_management_default_type: {{ cobbler['power_management']['default_type']|yaml_dquote }}
pxe_just_once: true
nopxe_with_triggers: true
redhat_management_server: "xmlrpc.rhn.redhat.com"
redhat_management_permissive: false
redhat_management_key: ""
register_new_installs: false
reposync_flags: "--newest-only --delete --refresh --remote-time"
reposync_rsync_flags: "-rltDv --copy-unsafe-links"
restart_dns: true
restart_dhcp: true
run_install_triggers: true
scm_track_enabled: {{ cobbler['scm_track']['enabled']|yaml_encode }}
scm_track_mode: {{ cobbler['scm_track']['mode']|yaml_dquote }}
scm_track_author: {{ cobbler['scm_track']['author']|yaml_dquote }}
scm_push_script: {{ cobbler['scm_track']['push_script']|yaml_dquote }}
server: {{ cobbler['server'] }}
client_use_localhost: false
client_use_https: false
virt_auto_boot: true
webdir: "{{ cobbler['webdir'] }}/cobbler"
webdir_whitelist:
- misc
- web
- webui
- localmirror
- repo_mirror
- distro_mirror
- images
- links
- pub
- repo_profile
- repo_system
- svc
- rendered
- .link_cache
xmlrpc_port: 25151
yum_post_install_mirror: true
yum_distro_priority: 1
yumdownloader_flags: "--resolve"
serializer_pretty_json: false
replicate_rsync_options: "-avzH"
replicate_repo_rsync_options: "-avzH"
always_write_dhcp_entries: false
proxy_url_ext: ""
proxy_url_int: ""
jinja2_includedir: "/var/lib/cobbler/jinja2"
convert_server_to_ip: false
buildisodir: "/var/cache/cobbler/buildiso"
cobbler_master: ""
default_virt_disk_driver: "raw"
grubconfig_dir: "/var/lib/cobbler/grub_config"
iso_template_dir: "/etc/cobbler/iso"
puppet_version: 2
signature_path: "/var/lib/cobbler/distro_signatures.json"
signature_url: "https://cobbler.github.io/signatures/3.0.x/latest.json"
include: [ "/etc/cobbler/settings.d/*.settings" ]
64 changes: 57 additions & 7 deletions cobbler/parameters/defaults.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,61 @@ values:
# This is mutually exclusive with "communityrepo"!
enabled: false
name: cobbler
rootgroup: root
config: '/etc/cobbler'
service:
name: cobbler
# Just here for testing
added_in_defaults: defaults_value
winner: defaults
...
name: cobblerd
rootgroup: root
auto_migrate_settings: false
server: "127.0.0.1"
menu:
enabled: true
default_kernel_options: {}
authentication:
module: "configfile"
password: "$1$mF86/UHC$WvcIcX2t6crBz2onWxyac."
authorization:
module: "allowall"
default_ownership: "admin"
bootloaders:
syslinux:
location: "/usr/share/syslinux"
memdisk_location: "/usr/share/syslinux"
pxelinux_location: "/usr/share/syslinux"
grub2:
mod_location: "/usr/share/grub2"
shim:
location: "/usr/share/efi/*/"
# This is YAML as such we need a double backslash to get a single one.
file: "shim\\.efi"
ipxe:
enabled: false
location: /usr/share/ipxe/
dhcp:
v4: false
v6: false
module: "isc"
dns:
enabled: false
module: "bind"
bind:
location: /var/lib/named
master: "127.0.0.1"
forward_zones: []
reverse_zones: []
tftp:
enabled: true
module: "in_tftpd"
location: "/srv/tftpboot"
nextserver:
v4: "127.0.0.1"
v6: "::1"
rsync:
enabled: false
power_management:
default_type: "ipmilanplus"
scm_track:
enabled: false
mode: "git"
author: "cobbler <cobbler@localhost>"
push_script: "/bin/true"
config: /etc/cobbler/settings.yaml
webdir: /var/www
7 changes: 6 additions & 1 deletion cobbler/parameters/os/Ubuntu.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,10 @@
# you can remove this file or provide at least an empty dict, e.g.
# values: {}
---
values: {}
values:
dns:
bind:
location: /etc/bind/db.
tftp:
location: /var/lib/tftpboot
...
10 changes: 10 additions & 0 deletions cobbler/parameters/os_family/Debian.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,17 @@
# values: {}
---
values:
bootloaders:
ipxe:
location: "/usr/lib/ipxe/"
shim:
location: "/usr/lib/shim/"
file: "shim.*\\.efi\\.signed"
syslinux:
location: "/usr/lib/syslinux/modules/bios/"
pkg:
communityrepo:
enabled: true
tftp:
location: "/srv/tftp"
...
5 changes: 5 additions & 0 deletions cobbler/parameters/os_family/RedHat.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,12 @@
# values: {}
---
values:
dns:
bind:
location: /var/named
pkg:
epel:
enabled: true
tftp:
location: "/var/lib/tftpboot"
...
Loading

0 comments on commit 957c53e

Please sign in to comment.