diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 621c0f43..4fe7fe6d 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -33,7 +33,8 @@ jobs: - ubuntu-2204 # - ubuntu2004 # - ubuntu1804 - - centos-stream8 + # - centos-stream8 + - centos-stream9 # - centos-7 - fedora-36 # - fedora35 diff --git a/FORMULA b/FORMULA index 068db2a7..54ddf636 100644 --- a/FORMULA +++ b/FORMULA @@ -3,7 +3,8 @@ os: Debian, Ubuntu, Raspbian, RedHat, Fedora, CentOS, Amazon, Oracle, Suse, open os_family: Debian, RedHat, Suse version: 1.3.0 release: 1 -minimum_version: 2019.2 +# This is due to the dict_to_sls_yaml_params filter for the kernel options +minimum_version: 3005 summary: cobbler formula description: Formula to use to manage the autoinstallation server Cobbler top_level_dir: cobbler diff --git a/cobbler/config/file.sls b/cobbler/config/file.sls index 38eac9d3..812dcd40 100644 --- a/cobbler/config/file.sls +++ b/cobbler/config/file.sls @@ -13,7 +13,7 @@ include: cobbler-config-file-file-managed: file.managed: - name: {{ cobbler.config }} - - source: {{ files_switch(['example.tmpl'], + - source: {{ files_switch([ cobbler.version + '/settings.yaml.jinja'], lookup='cobbler-config-file-file-managed' ) }} @@ -26,3 +26,37 @@ cobbler-config-file-file-managed: - sls: {{ sls_package_install }} - context: cobbler: {{ cobbler | json }} + +cobbler-modules-file-file-managed: + file.managed: + - name: /etc/cobbler/modules.conf + - source: {{ files_switch([ cobbler.version + '/modules.conf.jinja'], + lookup='cobbler-modules-file-file-managed' + ) + }} + - mode: 644 + - user: root + - group: {{ cobbler.rootgroup }} + - makedirs: True + - template: jinja + - require: + - sls: {{ sls_package_install }} + - context: + cobbler: {{ cobbler | json }} + +cobbler-mongodb-file-file-managed: + file.managed: + - name: /etc/cobbler/mongodb.conf + - source: {{ files_switch([ cobbler.version + '/mongodb.conf.jinja'], + lookup='cobbler-mongodb-file-file-managed' + ) + }} + - mode: 644 + - user: root + - group: {{ cobbler.rootgroup }} + - makedirs: True + - template: jinja + - require: + - sls: {{ sls_package_install }} + - context: + cobbler: {{ cobbler | json }} diff --git a/cobbler/files/default/3.2.0/modules.conf.jinja b/cobbler/files/default/3.2.0/modules.conf.jinja new file mode 100644 index 00000000..608c95c5 --- /dev/null +++ b/cobbler/files/default/3.2.0/modules.conf.jinja @@ -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.{{ cobbler['authentication']['module'] }} +hash_algorithm = sha3_512 + +[authorization] +module = authorization.{{ cobbler['authorization']['module'] }} + +[dns] +module = managers.{{ cobbler['dns']['module'] }} + +[dhcp] +module = managers.{{ cobbler['dhcp']['module'] }} + +[tftpd] +module = managers.{{ cobbler['tftp']['module'] }} diff --git a/cobbler/files/default/3.2.0/mongodb.conf.jinja b/cobbler/files/default/3.2.0/mongodb.conf.jinja new file mode 100644 index 00000000..cef167e9 --- /dev/null +++ b/cobbler/files/default/3.2.0/mongodb.conf.jinja @@ -0,0 +1,6 @@ +# Cobbler MongoDB configuration file +# THIS FILE IS MANAGED BY SALTSTACK! + +[connection] +host = localhost +port = 27017 \ No newline at end of file diff --git a/cobbler/files/default/3.2.0/settings.jinja b/cobbler/files/default/3.2.0/settings.jinja new file mode 100644 index 00000000..7c5c2d92 --- /dev/null +++ b/cobbler/files/default/3.2.0/settings.jinja @@ -0,0 +1,142 @@ +# Cobbler settings file +# THIS FILE IS MANAGED BY SALTSTACK! +# This config file is in YAML 1.2 format; see "http://yaml.org". + +allow_duplicate_hostnames: 0 +allow_duplicate_ips: 0 +allow_duplicate_macs: 0 +allow_dynamic_settings: 0 +anamon_enabled: 0 +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" +build_reporting_enabled: 0 +build_reporting_sender: "" +build_reporting_email: [ 'root@localhost' ] +build_reporting_smtp_server: "localhost" +build_reporting_subject: "" +build_reporting_ignorelist: [ "" ] +cache_enabled: 1 +cheetah_import_whitelist: + - "random" + - "re" + - "time" + - "netaddr" +createrepo_flags: "-c cache -s sha" +default_autoinstall: /var/lib/cobbler/autoinstall_templates/default.ks +default_name_servers: [] +default_name_servers_search: [] +{% if not cobbler['authorization']['default_ownership'] -%} +default_ownership: [] +{% else -%} +default_ownership: +{% for owner in cobbler['authorization']['default_ownership'] -%} + - {{ owner|yaml_encode }} +{% endfor -%} +{% endif %} +default_password_crypted: {{ cobbler['authentication']['password']|yaml_encode }} +default_template_type: "cheetah" +default_virt_bridge: xenbr0 +default_virt_file_size: 5 +default_virt_ram: 512 +default_virt_type: xenpv +enable_gpxe: {{ cobbler['bootloaders']['ipxe']['enabled']|int }} +enable_menu: {{ cobbler['menu']['enabled']|int }} +http_port: 80 +{% if not cobbler.get("default_kernel_options", {}) -%} +kernel_options: {} +{% else -%} +kernel_options: + {{ cobbler.get("default_kernel_options", {}) | dict_to_sls_yaml_params | indent }} +{% endif -%} +ldap_server: "ldap.example.com" +ldap_base_dn: "DC=example,DC=com" +ldap_port: 389 +ldap_tls: 1 +ldap_anonymous_bind: 1 +ldap_search_bind_dn: '' +ldap_search_passwd: '' +ldap_search_prefix: 'uid=' +ldap_tls_cacertfile: '' +ldap_tls_keyfile: '' +ldap_tls_certfile: '' +mgmt_classes: [] +mgmt_parameters: + from_cobbler: 1 +puppet_auto_setup: 0 +sign_puppet_certs_automatically: 0 +puppetca_path: "/usr/bin/puppet" +remove_old_puppet_certs_automatically: 0 +manage_dhcp: {{ (cobbler['dhcp']['v4'] or cobbler['dhcp']['v6'])|int }} +manage_dns: {{ cobbler['dns']['enabled']|int }} +bind_chroot_path: "" +bind_master: {{ cobbler['dns']['bind']['master']|yaml_encode }} +manage_tftpd: {{ cobbler['tftp']['enabled']|int }} +tftpboot_location: {{ cobbler['tftp']['location']|yaml_encode }} +manage_rsync: {{ cobbler['rsync']['enabled']|int }} +{% if not cobbler['dns']['bind']['forward_zones'] -%} +manage_forward_zones: [] +{% else -%} +manage_forward_zones: +{% for zone in cobbler['dns']['bind']['forward_zones'] -%} + - {{ zone|yaml_encode }} +{% endfor -%} +{% endif %} +{% if not cobbler['dns']['bind']['forward_zones'] -%} +manage_reverse_zones: [] +{% else -%} +manage_reverse_zones: +{% for zone in cobbler['dns']['bind']['reverse_zones'] -%} + - {{ zone|yaml_encode }} +{% endfor -%} +{% endif %} +next_server: {{ cobbler['nextserver']['v4']|yaml_dquote }} +power_management_default_type: {{ cobbler['power_management']['default_type']|yaml_dquote }} +pxe_just_once: 1 +nopxe_with_triggers: 1 +redhat_management_server: "xmlrpc.rhn.redhat.com" +redhat_management_permissive: 0rsync +redhat_management_key: "" +register_new_installs: 0 +reposync_flags: "-l -n -d" +reposync_rsync_flags: "-rltDv --copy-unsafe-links" +restart_dns: 1 +restart_dhcp: 1 +run_install_triggers: 1 +scm_track_enabled: {{ cobbler['scm_track']['enabled']|int }} +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: 0 +client_use_https: 0 +virt_auto_boot: 1 +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: 1 +yum_distro_priority: 1 +yumdownloader_flags: "--resolve" +serializer_pretty_json: 0 +replicate_rsync_options: "-avzH" +replicate_repo_rsync_options: "-avzH" +always_write_dhcp_entries: 0 +proxy_url_ext: "" +proxy_url_int: "" +include: [ "/etc/cobbler/settings.d/*.settings" ] diff --git a/cobbler/files/default/3.2.1/modules.conf.jinja b/cobbler/files/default/3.2.1/modules.conf.jinja new file mode 100644 index 00000000..608c95c5 --- /dev/null +++ b/cobbler/files/default/3.2.1/modules.conf.jinja @@ -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.{{ cobbler['authentication']['module'] }} +hash_algorithm = sha3_512 + +[authorization] +module = authorization.{{ cobbler['authorization']['module'] }} + +[dns] +module = managers.{{ cobbler['dns']['module'] }} + +[dhcp] +module = managers.{{ cobbler['dhcp']['module'] }} + +[tftpd] +module = managers.{{ cobbler['tftp']['module'] }} diff --git a/cobbler/files/default/3.2.1/mongodb.conf.jinja b/cobbler/files/default/3.2.1/mongodb.conf.jinja new file mode 100644 index 00000000..cef167e9 --- /dev/null +++ b/cobbler/files/default/3.2.1/mongodb.conf.jinja @@ -0,0 +1,6 @@ +# Cobbler MongoDB configuration file +# THIS FILE IS MANAGED BY SALTSTACK! + +[connection] +host = localhost +port = 27017 \ No newline at end of file diff --git a/cobbler/files/default/3.2.1/settings.yaml.jinja b/cobbler/files/default/3.2.1/settings.yaml.jinja new file mode 100644 index 00000000..4a5b9b5c --- /dev/null +++ b/cobbler/files/default/3.2.1/settings.yaml.jinja @@ -0,0 +1,155 @@ +# Cobbler settings file +# THIS FILE IS MANAGED BY SALTSTACK! +# This config file is in YAML 1.2 format; see "http://yaml.org". + +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" +build_reporting_enabled: false +build_reporting_sender: "" +build_reporting_email: [ 'root@localhost' ] +build_reporting_smtp_server: "localhost" +build_reporting_subject: "" +build_reporting_ignorelist: [] +cache_enabled: true +cheetah_import_whitelist: + - "random" + - "re" + - "time" + - "netaddr" +createrepo_flags: "-c cache -s sha" +default_autoinstall: /var/lib/cobbler/autoinstall_templates/default.ks +default_name_servers: [] +default_name_servers_search: [] +{% if not cobbler['authorization']['default_ownership'] -%} +default_ownership: [] +{% else -%} +default_ownership: +{% for owner in cobbler['authorization']['default_ownership'] -%} + - {{ owner|yaml_encode }} +{% endfor -%} +{% endif %} +default_password_crypted: {{ cobbler['authentication']['password']|yaml_encode }} +default_template_type: "cheetah" +default_virt_bridge: xenbr0 +default_virt_file_size: 5 +default_virt_ram: 512 +default_virt_type: xenpv +enable_gpxe: {{ cobbler['bootloaders']['ipxe']['enabled']|yaml_encode }} +enable_menu: {{ cobbler['menu']['enabled']|yaml_encode }} +http_port: 80 +{% if not cobbler.get("default_kernel_options", {}) -%} +kernel_options: {} +{% else -%} +kernel_options: + {{ cobbler.get("default_kernel_options", {}) | dict_to_sls_yaml_params | indent }} +{% endif -%} +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: '' +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_parameterized_classes: true +manage_dhcp: {{ (cobbler['dhcp']['v4'] or cobbler['dhcp']['v6'])|yaml_encode }} +manage_dns: false +bind_chroot_path: "" +bind_master: {{ cobbler['dns']['bind']['master']|yaml_encode }} +manage_tftpd: {{ cobbler['tftp']['enabled']|yaml_encode }} +tftpboot_location: {{ cobbler['tftp']['location']|yaml_encode }} +manage_rsync: {{ cobbler['rsync']['enabled']|yaml_encode }} +{% if not cobbler['dns']['bind']['forward_zones'] -%} +manage_forward_zones: [] +{% else -%} +manage_forward_zones: +{% for zone in cobbler['dns']['bind']['forward_zones'] -%} + - {{ zone|yaml_encode }} +{% endfor -%} +{% endif %} +{% if not cobbler['dns']['bind']['forward_zones'] -%} +manage_reverse_zones: [] +{% else -%} +manage_reverse_zones: +{% for zone in cobbler['dns']['bind']['reverse_zones'] -%} + - {{ zone|yaml_encode }} +{% endfor -%} +{% endif %} +next_server: {{ cobbler['nextserver']['v4']|yaml_dquote }} +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: "-l -n -d" +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 +bootloaders_dir: "/var/lib/cobbler/loaders" +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_server: "" +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" ] diff --git a/cobbler/files/default/3.2.2/modules.conf.jinja b/cobbler/files/default/3.2.2/modules.conf.jinja new file mode 100644 index 00000000..608c95c5 --- /dev/null +++ b/cobbler/files/default/3.2.2/modules.conf.jinja @@ -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.{{ cobbler['authentication']['module'] }} +hash_algorithm = sha3_512 + +[authorization] +module = authorization.{{ cobbler['authorization']['module'] }} + +[dns] +module = managers.{{ cobbler['dns']['module'] }} + +[dhcp] +module = managers.{{ cobbler['dhcp']['module'] }} + +[tftpd] +module = managers.{{ cobbler['tftp']['module'] }} diff --git a/cobbler/files/default/3.2.2/mongodb.conf.jinja b/cobbler/files/default/3.2.2/mongodb.conf.jinja new file mode 100644 index 00000000..cef167e9 --- /dev/null +++ b/cobbler/files/default/3.2.2/mongodb.conf.jinja @@ -0,0 +1,6 @@ +# Cobbler MongoDB configuration file +# THIS FILE IS MANAGED BY SALTSTACK! + +[connection] +host = localhost +port = 27017 \ No newline at end of file diff --git a/cobbler/files/default/3.2.2/settings.yaml.jinja b/cobbler/files/default/3.2.2/settings.yaml.jinja new file mode 100644 index 00000000..9b3649e0 --- /dev/null +++ b/cobbler/files/default/3.2.2/settings.yaml.jinja @@ -0,0 +1,155 @@ +# Cobbler settings file +# THIS FILE IS MANAGED BY SALTSTACK! +# This config file is in YAML 1.2 format; see "http://yaml.org". + +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" +build_reporting_enabled: false +build_reporting_sender: "" +build_reporting_email: [ 'root@localhost' ] +build_reporting_smtp_server: "localhost" +build_reporting_subject: "" +build_reporting_ignorelist: [] +cache_enabled: true +cheetah_import_whitelist: + - "random" + - "re" + - "time" + - "netaddr" +createrepo_flags: "-c cache -s sha" +default_autoinstall: /var/lib/cobbler/autoinstall_templates/default.ks +default_name_servers: [] +default_name_servers_search: [] +{% if not cobbler['authorization']['default_ownership'] -%} +default_ownership: [] +{% else -%} +default_ownership: +{% for owner in cobbler['authorization']['default_ownership'] -%} + - {{ owner|yaml_encode }} +{% endfor -%} +{% endif %} +default_password_crypted: {{ cobbler['authentication']['password']|yaml_encode }} +default_template_type: "cheetah" +default_virt_bridge: xenbr0 +default_virt_file_size: 5 +default_virt_ram: 512 +default_virt_type: xenpv +enable_gpxe: {{ cobbler['bootloaders']['ipxe']['enabled']|yaml_encode }} +enable_menu: {{ cobbler['menu']['enabled']|yaml_encode }} +http_port: 80 +{% if not cobbler.get("default_kernel_options", {}) -%} +kernel_options: {} +{% else -%} +kernel_options: + {{ cobbler.get("default_kernel_options", {}) | dict_to_sls_yaml_params | indent }} +{% endif -%} +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: '' +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_parameterized_classes: true +manage_dhcp: {{ (cobbler['dhcp']['v4'] or cobbler['dhcp']['v6'])|yaml_encode }} +manage_dns: {{ cobbler['dns']['enabled']|yaml_encode }} +bind_chroot_path: "" +bind_master: {{ cobbler['dns']['bind']['master']|yaml_encode }} +manage_tftpd: {{ cobbler['tftp']['enabled']|yaml_encode }} +tftpboot_location: {{ cobbler['tftp']['location']|yaml_encode }} +manage_rsync: {{ cobbler['rsync']['enabled']|yaml_encode }} +{% if not cobbler['dns']['bind']['forward_zones'] -%} +manage_forward_zones: [] +{% else -%} +manage_forward_zones: +{% for zone in cobbler['dns']['bind']['forward_zones'] -%} + - {{ zone|yaml_encode }} +{% endfor -%} +{% endif %} +{% if not cobbler['dns']['bind']['forward_zones'] -%} +manage_reverse_zones: [] +{% else -%} +manage_reverse_zones: +{% for zone in cobbler['dns']['bind']['reverse_zones'] -%} + - {{ zone|yaml_encode }} +{% endfor -%} +{% endif %} +next_server: {{ cobbler['nextserver']['v4']|yaml_dquote }} +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: "-l -n -d" +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 +bootloaders_dir: "/var/lib/cobbler/loaders" +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_server: "" +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" ] diff --git a/cobbler/files/default/3.3.0/modules.conf.jinja b/cobbler/files/default/3.3.0/modules.conf.jinja new file mode 100644 index 00000000..608c95c5 --- /dev/null +++ b/cobbler/files/default/3.3.0/modules.conf.jinja @@ -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.{{ cobbler['authentication']['module'] }} +hash_algorithm = sha3_512 + +[authorization] +module = authorization.{{ cobbler['authorization']['module'] }} + +[dns] +module = managers.{{ cobbler['dns']['module'] }} + +[dhcp] +module = managers.{{ cobbler['dhcp']['module'] }} + +[tftpd] +module = managers.{{ cobbler['tftp']['module'] }} diff --git a/cobbler/files/default/3.3.0/mongodb.conf.jinja b/cobbler/files/default/3.3.0/mongodb.conf.jinja new file mode 100644 index 00000000..cef167e9 --- /dev/null +++ b/cobbler/files/default/3.3.0/mongodb.conf.jinja @@ -0,0 +1,6 @@ +# Cobbler MongoDB configuration file +# THIS FILE IS MANAGED BY SALTSTACK! + +[connection] +host = localhost +port = 27017 \ No newline at end of file diff --git a/cobbler/files/default/3.3.0/settings.yaml.jinja b/cobbler/files/default/3.3.0/settings.yaml.jinja new file mode 100644 index 00000000..490194f6 --- /dev/null +++ b/cobbler/files/default/3.3.0/settings.yaml.jinja @@ -0,0 +1,242 @@ +# 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: + 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 }} +grub2_mod_dir: {{ cobbler['bootloaders']['grub2']['mod_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: [] +{% if not cobbler['authorization']['default_ownership'] -%} +default_ownership: [] +{% else -%} +default_ownership: +{% for owner in cobbler['authorization']['default_ownership'] -%} + - {{ owner|yaml_encode }} +{% endfor -%} +{% endif %} +default_password_crypted: {{ cobbler['authentication']['password']|yaml_encode }} +default_template_type: "cheetah" +default_virt_bridge: xenbr0 +default_virt_file_size: 5 +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 +{% if not cobbler.get("default_kernel_options", {}) -%} +kernel_options: {} +{% else -%} +kernel_options: + {{ cobbler.get("default_kernel_options", {}) | dict_to_sls_yaml_params | indent }} +{% endif -%} +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: '' +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_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: false +bind_chroot_path: "" +bind_zonefile_path: {{ cobbler['dns']['bind']['location']|yaml_encode }} +bind_master: {{ cobbler['dns']['bind']['master']|yaml_encode }} +{% if not cobbler['dns']['bind']['forward_zones'] -%} +manage_forward_zones: [] +{% else -%} +manage_forward_zones: +{% for zone in cobbler['dns']['bind']['forward_zones'] -%} + - {{ zone|yaml_encode }} +{% endfor -%} +{% endif %} +{% if not cobbler['dns']['bind']['forward_zones'] -%} +manage_reverse_zones: [] +{% else -%} +manage_reverse_zones: +{% for zone in cobbler['dns']['bind']['reverse_zones'] -%} + - {{ zone|yaml_encode }} +{% endfor -%} +{% endif %} +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_server: "" +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" ] diff --git a/cobbler/files/default/3.3.1/modules.conf.jinja b/cobbler/files/default/3.3.1/modules.conf.jinja new file mode 100644 index 00000000..608c95c5 --- /dev/null +++ b/cobbler/files/default/3.3.1/modules.conf.jinja @@ -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.{{ cobbler['authentication']['module'] }} +hash_algorithm = sha3_512 + +[authorization] +module = authorization.{{ cobbler['authorization']['module'] }} + +[dns] +module = managers.{{ cobbler['dns']['module'] }} + +[dhcp] +module = managers.{{ cobbler['dhcp']['module'] }} + +[tftpd] +module = managers.{{ cobbler['tftp']['module'] }} diff --git a/cobbler/files/default/3.3.1/mongodb.conf.jinja b/cobbler/files/default/3.3.1/mongodb.conf.jinja new file mode 100644 index 00000000..cef167e9 --- /dev/null +++ b/cobbler/files/default/3.3.1/mongodb.conf.jinja @@ -0,0 +1,6 @@ +# Cobbler MongoDB configuration file +# THIS FILE IS MANAGED BY SALTSTACK! + +[connection] +host = localhost +port = 27017 \ No newline at end of file diff --git a/cobbler/files/default/3.3.1/settings.yaml.jinja b/cobbler/files/default/3.3.1/settings.yaml.jinja new file mode 100644 index 00000000..c5604141 --- /dev/null +++ b/cobbler/files/default/3.3.1/settings.yaml.jinja @@ -0,0 +1,250 @@ +# 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: [] +{% if not cobbler['authorization']['default_ownership'] -%} +default_ownership: [] +{% else -%} +default_ownership: +{% for owner in cobbler['authorization']['default_ownership'] -%} + - {{ owner|yaml_encode }} +{% endfor -%} +{% endif %} +default_password_crypted: {{ cobbler['authentication']['password']|yaml_encode }} +default_template_type: "cheetah" +default_virt_bridge: xenbr0 +default_virt_file_size: 5 +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 +{% if not cobbler.get("default_kernel_options", {}) -%} +kernel_options: {} +{% else -%} +kernel_options: + {{ cobbler.get("default_kernel_options", {}) | dict_to_sls_yaml_params | indent }} +{% endif -%} +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_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: false +bind_chroot_path: "" +bind_zonefile_path: {{ cobbler['dns']['bind']['location']|yaml_encode }} +bind_master: {{ cobbler['dns']['bind']['master']|yaml_encode }} +{% if not cobbler['dns']['bind']['forward_zones'] -%} +manage_forward_zones: [] +{% else -%} +manage_forward_zones: +{% for zone in cobbler['dns']['bind']['forward_zones'] -%} + - {{ zone|yaml_encode }} +{% endfor -%} +{% endif %} +{% if not cobbler['dns']['bind']['forward_zones'] -%} +manage_reverse_zones: [] +{% else -%} +manage_reverse_zones: +{% for zone in cobbler['dns']['bind']['reverse_zones'] -%} + - {{ zone|yaml_encode }} +{% endfor -%} +{% endif %} +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_server: "" +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" ] diff --git a/cobbler/files/default/3.3.2/modules.conf.jinja b/cobbler/files/default/3.3.2/modules.conf.jinja new file mode 100644 index 00000000..608c95c5 --- /dev/null +++ b/cobbler/files/default/3.3.2/modules.conf.jinja @@ -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.{{ cobbler['authentication']['module'] }} +hash_algorithm = sha3_512 + +[authorization] +module = authorization.{{ cobbler['authorization']['module'] }} + +[dns] +module = managers.{{ cobbler['dns']['module'] }} + +[dhcp] +module = managers.{{ cobbler['dhcp']['module'] }} + +[tftpd] +module = managers.{{ cobbler['tftp']['module'] }} diff --git a/cobbler/files/default/3.3.2/mongodb.conf.jinja b/cobbler/files/default/3.3.2/mongodb.conf.jinja new file mode 100644 index 00000000..cef167e9 --- /dev/null +++ b/cobbler/files/default/3.3.2/mongodb.conf.jinja @@ -0,0 +1,6 @@ +# Cobbler MongoDB configuration file +# THIS FILE IS MANAGED BY SALTSTACK! + +[connection] +host = localhost +port = 27017 \ No newline at end of file diff --git a/cobbler/files/default/3.3.2/settings.yaml.jinja b/cobbler/files/default/3.3.2/settings.yaml.jinja new file mode 100644 index 00000000..e69de29b diff --git a/cobbler/files/default/3.3.3/modules.conf.jinja b/cobbler/files/default/3.3.3/modules.conf.jinja new file mode 100644 index 00000000..608c95c5 --- /dev/null +++ b/cobbler/files/default/3.3.3/modules.conf.jinja @@ -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.{{ cobbler['authentication']['module'] }} +hash_algorithm = sha3_512 + +[authorization] +module = authorization.{{ cobbler['authorization']['module'] }} + +[dns] +module = managers.{{ cobbler['dns']['module'] }} + +[dhcp] +module = managers.{{ cobbler['dhcp']['module'] }} + +[tftpd] +module = managers.{{ cobbler['tftp']['module'] }} diff --git a/cobbler/files/default/3.3.3/mongodb.conf.jinja b/cobbler/files/default/3.3.3/mongodb.conf.jinja new file mode 100644 index 00000000..cef167e9 --- /dev/null +++ b/cobbler/files/default/3.3.3/mongodb.conf.jinja @@ -0,0 +1,6 @@ +# Cobbler MongoDB configuration file +# THIS FILE IS MANAGED BY SALTSTACK! + +[connection] +host = localhost +port = 27017 \ No newline at end of file diff --git a/cobbler/files/default/3.3.3/settings.yaml.jinja b/cobbler/files/default/3.3.3/settings.yaml.jinja new file mode 100644 index 00000000..c61df609 --- /dev/null +++ b/cobbler/files/default/3.3.3/settings.yaml.jinja @@ -0,0 +1,251 @@ +# 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: [] +{% if not cobbler['authorization']['default_ownership'] -%} +default_ownership: [] +{% else -%} +default_ownership: +{% for owner in cobbler['authorization']['default_ownership'] -%} + - {{ owner|yaml_encode }} +{% endfor -%} +{% endif %} +default_password_crypted: {{ cobbler['authentication']['password']|yaml_encode }} +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 +{% if not cobbler.get("default_kernel_options", {}) -%} +kernel_options: {} +{% else -%} +kernel_options: + {{ cobbler.get("default_kernel_options", {}) | dict_to_sls_yaml_params | indent }} +{% endif -%} +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 }} +{% if not cobbler['dns']['bind']['forward_zones'] -%} +manage_forward_zones: [] +{% else -%} +manage_forward_zones: +{% for zone in cobbler['dns']['bind']['forward_zones'] -%} + - {{ zone|yaml_encode }} +{% endfor -%} +{% endif %} +{% if not cobbler['dns']['bind']['forward_zones'] -%} +manage_reverse_zones: [] +{% else -%} +manage_reverse_zones: +{% for zone in cobbler['dns']['bind']['reverse_zones'] -%} + - {{ zone|yaml_encode }} +{% endfor -%} +{% endif %} +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" ] diff --git a/cobbler/files/default/3.3.4/modules.conf.jinja b/cobbler/files/default/3.3.4/modules.conf.jinja new file mode 100644 index 00000000..608c95c5 --- /dev/null +++ b/cobbler/files/default/3.3.4/modules.conf.jinja @@ -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.{{ cobbler['authentication']['module'] }} +hash_algorithm = sha3_512 + +[authorization] +module = authorization.{{ cobbler['authorization']['module'] }} + +[dns] +module = managers.{{ cobbler['dns']['module'] }} + +[dhcp] +module = managers.{{ cobbler['dhcp']['module'] }} + +[tftpd] +module = managers.{{ cobbler['tftp']['module'] }} diff --git a/cobbler/files/default/3.3.4/mongodb.conf.jinja b/cobbler/files/default/3.3.4/mongodb.conf.jinja new file mode 100644 index 00000000..cef167e9 --- /dev/null +++ b/cobbler/files/default/3.3.4/mongodb.conf.jinja @@ -0,0 +1,6 @@ +# Cobbler MongoDB configuration file +# THIS FILE IS MANAGED BY SALTSTACK! + +[connection] +host = localhost +port = 27017 \ No newline at end of file diff --git a/cobbler/files/default/3.3.4/settings.yaml.jinja b/cobbler/files/default/3.3.4/settings.yaml.jinja new file mode 100644 index 00000000..c61df609 --- /dev/null +++ b/cobbler/files/default/3.3.4/settings.yaml.jinja @@ -0,0 +1,251 @@ +# 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: [] +{% if not cobbler['authorization']['default_ownership'] -%} +default_ownership: [] +{% else -%} +default_ownership: +{% for owner in cobbler['authorization']['default_ownership'] -%} + - {{ owner|yaml_encode }} +{% endfor -%} +{% endif %} +default_password_crypted: {{ cobbler['authentication']['password']|yaml_encode }} +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 +{% if not cobbler.get("default_kernel_options", {}) -%} +kernel_options: {} +{% else -%} +kernel_options: + {{ cobbler.get("default_kernel_options", {}) | dict_to_sls_yaml_params | indent }} +{% endif -%} +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 }} +{% if not cobbler['dns']['bind']['forward_zones'] -%} +manage_forward_zones: [] +{% else -%} +manage_forward_zones: +{% for zone in cobbler['dns']['bind']['forward_zones'] -%} + - {{ zone|yaml_encode }} +{% endfor -%} +{% endif %} +{% if not cobbler['dns']['bind']['forward_zones'] -%} +manage_reverse_zones: [] +{% else -%} +manage_reverse_zones: +{% for zone in cobbler['dns']['bind']['reverse_zones'] -%} + - {{ zone|yaml_encode }} +{% endfor -%} +{% endif %} +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" ] diff --git a/cobbler/files/default/example.tmpl b/cobbler/files/default/example.tmpl deleted file mode 100644 index 2c9c60f9..00000000 --- a/cobbler/files/default/example.tmpl +++ /dev/null @@ -1,6 +0,0 @@ -######################################################################## -# File managed by Salt at <{{ source }}>. -# Your changes will be overwritten. -######################################################################## - -This is an example file from SaltStack template-formula. diff --git a/cobbler/files/default/example.tmpl.jinja b/cobbler/files/default/example.tmpl.jinja deleted file mode 100644 index e8345d26..00000000 --- a/cobbler/files/default/example.tmpl.jinja +++ /dev/null @@ -1,11 +0,0 @@ -######################################################################## -# File managed by Salt at <{{ source }}>. -# Your changes will be overwritten. -######################################################################## - -This is another example file from SaltStack template-formula. - -# This is here for testing purposes -{{ cobbler | json }} - -winner of the merge: {{ cobbler['winner'] }} diff --git a/cobbler/parameters/defaults.yaml b/cobbler/parameters/defaults.yaml index a42e8563..0854dab5 100644 --- a/cobbler/parameters/defaults.yaml +++ b/cobbler/parameters/defaults.yaml @@ -4,6 +4,7 @@ # Set default values. --- values: + version: 3.3.4 pkg: source: enabled: false @@ -17,11 +18,64 @@ values: # This is mutually exclusive with "communityrepo"! enabled: false name: cobbler - rootgroup: root - config: '/etc/cobbler' service: name: cobblerd - # Just here for testing - added_in_defaults: defaults_value - winner: defaults -... + rootgroup: root + auto_migrate_settings: false + server: "127.0.0.1" + menu: + enabled: true + default_kernel_options: {} + authentication: + module: "configfile" + # This password is for the default login to newly + # setup machines, not Cobbler itself. + 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 " + push_script: "/bin/true" + config: /etc/cobbler/settings.yaml + webdir: /var/www diff --git a/cobbler/parameters/os/Ubuntu.yaml b/cobbler/parameters/os/Ubuntu.yaml index 3c35cb7f..1886cfae 100644 --- a/cobbler/parameters/os/Ubuntu.yaml +++ b/cobbler/parameters/os/Ubuntu.yaml @@ -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 ... diff --git a/cobbler/parameters/os_family/Debian.yaml b/cobbler/parameters/os_family/Debian.yaml index bae297c8..ffdbb48a 100644 --- a/cobbler/parameters/os_family/Debian.yaml +++ b/cobbler/parameters/os_family/Debian.yaml @@ -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" ... diff --git a/cobbler/parameters/os_family/RedHat.yaml b/cobbler/parameters/os_family/RedHat.yaml index 01067622..4ddd418a 100644 --- a/cobbler/parameters/os_family/RedHat.yaml +++ b/cobbler/parameters/os_family/RedHat.yaml @@ -12,7 +12,18 @@ # values: {} --- values: + bootloaders: + grub2: + mod_location: /usr/lib/grub + shim: + file: "shim[a-zA-Z0-9]*\\.efi" + location: "/boot/efi/EFI/*/" + dns: + bind: + location: /var/named pkg: epel: enabled: true + tftp: + location: "/var/lib/tftpboot" ... diff --git a/cobbler/parameters/os_family/Suse.yaml b/cobbler/parameters/os_family/Suse.yaml index a6088457..b8df81d0 100644 --- a/cobbler/parameters/os_family/Suse.yaml +++ b/cobbler/parameters/os_family/Suse.yaml @@ -11,5 +11,6 @@ # you can remove this file or provide at least an empty dict, e.g. # values: {} --- -values: {} +values: + webdir: /srv/www ... diff --git a/cobbler/parameters/osfinger/AlmaLinux-8.yaml b/cobbler/parameters/osfinger/AlmaLinux-8.yaml index 5c9dcd03..95b7b94b 100644 --- a/cobbler/parameters/osfinger/AlmaLinux-8.yaml +++ b/cobbler/parameters/osfinger/AlmaLinux-8.yaml @@ -12,6 +12,7 @@ # values: {} --- values: + version: 3.2.2 pkg: name: cobbler3.2 ... diff --git a/cobbler/parameters/osfinger/CentOS Stream-9.yaml b/cobbler/parameters/osfinger/CentOS Stream-9.yaml index 60aa382b..c7d7186f 100644 --- a/cobbler/parameters/osfinger/CentOS Stream-9.yaml +++ b/cobbler/parameters/osfinger/CentOS Stream-9.yaml @@ -13,5 +13,5 @@ --- values: pkg: - name: cobbler3.3 + name: cobbler ... diff --git a/cobbler/parameters/osfinger/Rocky Linux-8.yaml b/cobbler/parameters/osfinger/Rocky Linux-8.yaml index 82d3c1b8..991d5674 100644 --- a/cobbler/parameters/osfinger/Rocky Linux-8.yaml +++ b/cobbler/parameters/osfinger/Rocky Linux-8.yaml @@ -12,6 +12,7 @@ # values: {} --- values: + version: 3.2.2 pkg: name: cobbler3.2 ... diff --git a/kitchen.yml b/kitchen.yml index dd08ab15..a584779d 100644 --- a/kitchen.yml +++ b/kitchen.yml @@ -100,6 +100,9 @@ platforms: - name: centos-stream8-master-py3 driver: image: saltimages/salt-master-py3:centos-stream8 + - name: centos-stream9-master-py3 + driver: + image: saltimages/salt-master-py3:centos-stream9 - name: centos-7-master-py3 driver: image: saltimages/salt-master-py3:centos-7 diff --git a/pillar.example b/pillar.example index 917d3b1e..44a4f5e2 100644 --- a/pillar.example +++ b/pillar.example @@ -2,6 +2,9 @@ # vim: ft=yaml --- cobbler: + # Set this version to the version you are going to manage. It is going to decide + # which template is used for the settings files. + version: 3.3.4 pkg: communityrepo: # Enable the community maintained Cobbler repository. You may choose any valid @@ -46,3 +49,7 @@ cobbler: cobbler-config-file-file-managed: - 'example_alt.tmpl' - 'example_alt.tmpl.jinja' + cobbler-modules-file-file-managed: + - 'modules_alt.conf.jinja' + cobbler-mongodb-file-file-managed: + - 'mongodb_alt.conf.jinja' diff --git a/test/integration/default/controls/config.rb b/test/integration/default/controls/config.rb index afa5dde8..7c45ea8f 100644 --- a/test/integration/default/controls/config.rb +++ b/test/integration/default/controls/config.rb @@ -3,36 +3,19 @@ control 'cobbler.config.file' do title 'Verify the configuration file' - describe file('/etc/template-formula.conf') do + describe file('/etc/cobbler/settings.yaml') do it { should be_file } it { should be_owned_by 'root' } it { should be_grouped_into 'root' } its('mode') { should cmp '0644' } its('content') do - should include( - 'This is another example file from SaltStack template-formula.' - ) + should include('# THIS FILE IS MANAGED BY SALTSTACK!') end - its('content') { should include '"added_in_pillar": "pillar_value"' } - its('content') { should include '"added_in_defaults": "defaults_value"' } - its('content') { should include '"added_in_lookup": "lookup_value"' } - its('content') { should include '"config": "/etc/template-formula.conf"' } - its('content') { should include '"lookup": {"added_in_lookup": "lookup_value",' } - its('content') { should include '"pkg": {"communityrepo": {' } - its('content') { should include '"service": {"name": "' } - its('content') do - # rubocop:disable Lint/RedundantCopDisableDirective - # rubocop:disable Layout/LineLength - should include( - '"tofs": {"files_switch": ["any/path/can/be/used/here", "id", '\ - '"roles", "osfinger", "os", "os_family"], "source_files": '\ - '{"cobbler-config-file-file-managed": ["example.tmpl.jinja"]}}' - ) - # rubocop:enable Layout/LineLength - # rubocop:enable Lint/RedundantCopDisableDirective - end - its('content') { should include '"arch": "amd64"' } - its('content') { should include '"winner": "pillar"}' } - its('content') { should include 'winner of the merge: pillar' } + # Added in pillar + its('content') { should include 'manage_dns: true' } + # Added in defaults + its('content') { should include 'manage_tftpd: true' } + # Lookup value + its('content') { should include 'manage_dhcp: true' } end end diff --git a/test/integration/default/controls/packages.rb b/test/integration/default/controls/packages.rb index d79f20be..3398c6ee 100644 --- a/test/integration/default/controls/packages.rb +++ b/test/integration/default/controls/packages.rb @@ -11,7 +11,7 @@ case platform_finger when 'centos-8', 'rockylinux-8', 'almalinux-8' 'cobbler3.2' - when 'centos-9', 'rockylinux-9', 'almalinux-9' + when 'rockylinux-9', 'almalinux-9' 'cobbler3.3' else 'cobbler' diff --git a/test/integration/default/files/_mapdata/almalinux-8.yaml b/test/integration/default/files/_mapdata/almalinux-8.yaml index 271c9248..ebff1491 100644 --- a/test/integration/default/files/_mapdata/almalinux-8.yaml +++ b/test/integration/default/files/_mapdata/almalinux-8.yaml @@ -2,15 +2,45 @@ # AlmaLinux-8 --- values: - added_in_defaults: defaults_value - added_in_lookup: lookup_value - added_in_pillar: pillar_value arch: amd64 - config: /etc/template-formula.conf + authentication: + module: "configfile" + password: "$1$mF86/UHC$WvcIcX2t6crBz2onWxyac." + authorization: + default_ownership: + - "admin" + module: "allowall" + auto_migrate_settings: false + bootloaders: + grub2: + mod_location: "/usr/lib/grub" + ipxe: + enabled: false + location: "/usr/share/ipxe/" + shim: + file: "shim[a-zA-Z0-9]*\\.efi" + location: "/boot/efi/EFI/*/" + syslinux: + location: "/usr/share/syslinux" + memdisk_location: "/usr/share/syslinux" + pxelinux_location: "/usr/share/syslinux" + config: /etc/cobbler/settings.yaml + default_kernel_options: {} + dhcp: + module: "isc" + v4: true + v6: false + dns: + bind: + forward_zones: [] + location: "/var/named" + master: "127.0.0.1" + reverse_zones: [] + enabled: true + module: "bind" lookup: - added_in_lookup: lookup_value - master: template-master - winner: lookup + dhcp: + v4: true map_jinja: sources: - Y:G@osarch @@ -20,7 +50,11 @@ values: - C@cobbler:lookup - C@cobbler - Y:G@id - master: template-master + menu: + enabled: true + nextserver: + v4: "127.0.0.1" + v6: ::1 pkg: communityrepo: enabled: false @@ -31,12 +65,25 @@ values: source: enabled: false version: main + power_management: + default_type: "ipmilanplus" rootgroup: root + rsync: + enabled: false + scm_track: + author: "cobbler " + enabled: false + mode: "git" + push_script: "/bin/true" + server: "127.0.0.1" service: name: cobblerd + tftp: + enabled: true + location: "/var/lib/tftpboot" + module: "in_tftpd" tofs: files_switch: - - any/path/can/be/used/here - id - roles - osfinger @@ -44,5 +91,10 @@ values: - os_family source_files: cobbler-config-file-file-managed: - - example.tmpl.jinja - winner: pillar + - settings.yaml.jinja + cobbler-modules-file-file-managed: + - 'modules.conf.jinja' + cobbler-mongodb-file-file-managed: + - 'mongodb.conf.jinja' + version: 3.2.2 + webdir: "/var/www" diff --git a/test/integration/default/files/_mapdata/amazonlinux-1.yaml b/test/integration/default/files/_mapdata/amazonlinux-1.yaml index d83290ca..ca912da2 100644 --- a/test/integration/default/files/_mapdata/amazonlinux-1.yaml +++ b/test/integration/default/files/_mapdata/amazonlinux-1.yaml @@ -37,4 +37,8 @@ values: source_files: cobbler-config-file-file-managed: - example.tmpl.jinja + cobbler-modules-file-file-managed: + - 'modules.conf.jinja' + cobbler-mongodb-file-file-managed: + - 'mongodb.conf.jinja' winner: pillar diff --git a/test/integration/default/files/_mapdata/amazonlinux-2.yaml b/test/integration/default/files/_mapdata/amazonlinux-2.yaml index e8f65f6e..9c184680 100644 --- a/test/integration/default/files/_mapdata/amazonlinux-2.yaml +++ b/test/integration/default/files/_mapdata/amazonlinux-2.yaml @@ -37,4 +37,8 @@ values: source_files: cobbler-config-file-file-managed: - example.tmpl.jinja + cobbler-modules-file-file-managed: + - 'modules.conf.jinja' + cobbler-mongodb-file-file-managed: + - 'mongodb.conf.jinja' winner: pillar diff --git a/test/integration/default/files/_mapdata/centos-6.yaml b/test/integration/default/files/_mapdata/centos-6.yaml index 308f8a17..dbd79dc2 100644 --- a/test/integration/default/files/_mapdata/centos-6.yaml +++ b/test/integration/default/files/_mapdata/centos-6.yaml @@ -37,4 +37,8 @@ values: source_files: cobbler-config-file-file-managed: - example.tmpl.jinja + cobbler-modules-file-file-managed: + - 'modules.conf.jinja' + cobbler-mongodb-file-file-managed: + - 'mongodb.conf.jinja' winner: pillar diff --git a/test/integration/default/files/_mapdata/centos-7.yaml b/test/integration/default/files/_mapdata/centos-7.yaml index e569582f..c6faec56 100644 --- a/test/integration/default/files/_mapdata/centos-7.yaml +++ b/test/integration/default/files/_mapdata/centos-7.yaml @@ -37,4 +37,8 @@ values: source_files: cobbler-config-file-file-managed: - example.tmpl.jinja + cobbler-modules-file-file-managed: + - 'modules.conf.jinja' + cobbler-mongodb-file-file-managed: + - 'mongodb.conf.jinja' winner: pillar diff --git a/test/integration/default/files/_mapdata/centos-8.yaml b/test/integration/default/files/_mapdata/centos-8.yaml index 0a42b00d..415aeb21 100644 --- a/test/integration/default/files/_mapdata/centos-8.yaml +++ b/test/integration/default/files/_mapdata/centos-8.yaml @@ -2,15 +2,45 @@ # CentOS Linux-8 --- values: - added_in_defaults: defaults_value - added_in_lookup: lookup_value - added_in_pillar: pillar_value arch: amd64 - config: /etc/template-formula.conf + authentication: + module: "configfile" + password: "$1$mF86/UHC$WvcIcX2t6crBz2onWxyac." + authorization: + default_ownership: + - "admin" + module: "allowall" + auto_migrate_settings: false + bootloaders: + grub2: + mod_location: "/usr/lib/grub" + ipxe: + enabled: false + location: "/usr/share/ipxe/" + shim: + file: "shim[a-zA-Z0-9]*\\.efi" + location: "/boot/efi/EFI/*/" + syslinux: + location: "/usr/share/syslinux" + memdisk_location: "/usr/share/syslinux" + pxelinux_location: "/usr/share/syslinux" + config: /etc/cobbler/settings.yaml + default_kernel_options: {} + dhcp: + module: "isc" + v4: true + v6: false + dns: + bind: + forward_zones: [] + location: "/var/named" + master: "127.0.0.1" + reverse_zones: [] + enabled: true + module: "bind" lookup: - added_in_lookup: lookup_value - master: template-master - winner: lookup + dhcp: + v4: true map_jinja: sources: - Y:G@osarch @@ -20,7 +50,11 @@ values: - C@cobbler:lookup - C@cobbler - Y:G@id - master: template-master + menu: + enabled: true + nextserver: + v4: "127.0.0.1" + v6: ::1 pkg: communityrepo: enabled: false @@ -31,12 +65,25 @@ values: source: enabled: false version: main + power_management: + default_type: "ipmilanplus" rootgroup: root + rsync: + enabled: false + scm_track: + author: "cobbler " + enabled: false + mode: "git" + push_script: "/bin/true" + server: "127.0.0.1" service: name: cobblerd + tftp: + enabled: true + location: "/var/lib/tftpboot" + module: "in_tftpd" tofs: files_switch: - - any/path/can/be/used/here - id - roles - osfinger @@ -44,5 +91,10 @@ values: - os_family source_files: cobbler-config-file-file-managed: - - example.tmpl.jinja - winner: pillar + - settings.yaml.jinja + cobbler-modules-file-file-managed: + - 'modules.conf.jinja' + cobbler-mongodb-file-file-managed: + - 'mongodb.conf.jinja' + version: 3.3.4 + webdir: "/var/www" diff --git a/test/integration/default/files/_mapdata/centos-9.yaml b/test/integration/default/files/_mapdata/centos-9.yaml new file mode 100644 index 00000000..136019ca --- /dev/null +++ b/test/integration/default/files/_mapdata/centos-9.yaml @@ -0,0 +1,100 @@ +# yamllint disable rule:indentation rule:line-length +# CentOS Linux-9 +--- +values: + arch: amd64 + authentication: + module: "configfile" + password: "$1$mF86/UHC$WvcIcX2t6crBz2onWxyac." + authorization: + default_ownership: + - "admin" + module: "allowall" + auto_migrate_settings: false + bootloaders: + grub2: + mod_location: "/usr/lib/grub" + ipxe: + enabled: false + location: "/usr/share/ipxe/" + shim: + file: "shim[a-zA-Z0-9]*\\.efi" + location: "/boot/efi/EFI/*/" + syslinux: + location: "/usr/share/syslinux" + memdisk_location: "/usr/share/syslinux" + pxelinux_location: "/usr/share/syslinux" + config: /etc/cobbler/settings.yaml + default_kernel_options: {} + dhcp: + module: "isc" + v4: true + v6: false + dns: + bind: + forward_zones: [] + location: "/var/named" + master: "127.0.0.1" + reverse_zones: [] + enabled: true + module: "bind" + lookup: + dhcp: + v4: true + map_jinja: + sources: + - Y:G@osarch + - Y:G@os_family + - Y:G@os + - Y:G@osfinger + - C@cobbler:lookup + - C@cobbler + - Y:G@id + menu: + enabled: true + nextserver: + v4: "127.0.0.1" + v6: ::1 + pkg: + communityrepo: + enabled: false + version: 3.3.x + epel: + enabled: true + name: cobbler + source: + enabled: false + version: main + power_management: + default_type: "ipmilanplus" + rootgroup: root + rsync: + enabled: false + scm_track: + author: "cobbler " + enabled: false + mode: "git" + push_script: "/bin/true" + server: "127.0.0.1" + service: + name: cobblerd + tftp: + enabled: true + location: "/var/lib/tftpboot" + module: "in_tftpd" + tofs: + files_switch: + - id + - roles + - osfinger + - os + - os_family + source_files: + cobbler-config-file-file-managed: + - settings.yaml.jinja + cobbler-modules-file-file-managed: + - 'modules.conf.jinja' + cobbler-mongodb-file-file-managed: + - 'mongodb.conf.jinja' + version: 3.3.4 + webdir: "/var/www" diff --git a/test/integration/default/files/_mapdata/debian-10.yaml b/test/integration/default/files/_mapdata/debian-10.yaml index 30dd183b..02edc733 100644 --- a/test/integration/default/files/_mapdata/debian-10.yaml +++ b/test/integration/default/files/_mapdata/debian-10.yaml @@ -22,7 +22,8 @@ values: - Y:G@id master: template-master pkg: - name: bash + communityrepo: + enabled: true rootgroup: root service: name: cobblerd @@ -37,4 +38,8 @@ values: source_files: cobbler-config-file-file-managed: - example.tmpl.jinja + cobbler-modules-file-file-managed: + - 'modules.conf.jinja' + cobbler-mongodb-file-file-managed: + - 'mongodb.conf.jinja' winner: pillar diff --git a/test/integration/default/files/_mapdata/debian-11.yaml b/test/integration/default/files/_mapdata/debian-11.yaml index dddf1168..89ebc427 100644 --- a/test/integration/default/files/_mapdata/debian-11.yaml +++ b/test/integration/default/files/_mapdata/debian-11.yaml @@ -2,15 +2,45 @@ # Debian-11 --- values: - added_in_defaults: defaults_value - added_in_lookup: lookup_value - added_in_pillar: pillar_value arch: amd64 - config: /etc/template-formula.conf + authentication: + module: "configfile" + password: "$1$mF86/UHC$WvcIcX2t6crBz2onWxyac." + authorization: + default_ownership: + - "admin" + module: "allowall" + auto_migrate_settings: false + bootloaders: + grub2: + mod_location: "/usr/share/grub2" + ipxe: + enabled: false + location: "/usr/lib/ipxe/" + shim: + file: "shim.*\\.efi\\.signed" + location: "/usr/lib/shim/" + syslinux: + location: "/usr/lib/syslinux/modules/bios/" + memdisk_location: "/usr/share/syslinux" + pxelinux_location: "/usr/share/syslinux" + config: /etc/cobbler/settings.yaml + default_kernel_options: {} + dhcp: + module: "isc" + v4: true + v6: false + dns: + bind: + forward_zones: [] + location: "/var/lib/named" + master: "127.0.0.1" + reverse_zones: [] + enabled: true + module: "bind" lookup: - added_in_lookup: lookup_value - master: template-master - winner: lookup + dhcp: + v4: true map_jinja: sources: - Y:G@osarch @@ -20,7 +50,11 @@ values: - C@cobbler:lookup - C@cobbler - Y:G@id - master: template-master + menu: + enabled: true + nextserver: + v4: "127.0.0.1" + v6: ::1 pkg: communityrepo: enabled: true @@ -31,12 +65,25 @@ values: source: enabled: false version: "main" + power_management: + default_type: "ipmilanplus" rootgroup: root + rsync: + enabled: false + scm_track: + author: "cobbler " + enabled: false + mode: "git" + push_script: "/bin/true" + server: "127.0.0.1" service: name: cobblerd + tftp: + enabled: true + location: "/srv/tftp" + module: "in_tftpd" tofs: files_switch: - - any/path/can/be/used/here - id - roles - osfinger @@ -44,5 +91,10 @@ values: - os_family source_files: cobbler-config-file-file-managed: - - example.tmpl.jinja - winner: pillar + - settings.yaml.jinja + cobbler-modules-file-file-managed: + - 'modules.conf.jinja' + cobbler-mongodb-file-file-managed: + - 'mongodb.conf.jinja' + version: 3.3.4 + webdir: "/var/www" diff --git a/test/integration/default/files/_mapdata/debian-9.yaml b/test/integration/default/files/_mapdata/debian-9.yaml index 3c63820c..ab3dd1b6 100644 --- a/test/integration/default/files/_mapdata/debian-9.yaml +++ b/test/integration/default/files/_mapdata/debian-9.yaml @@ -22,7 +22,8 @@ values: - Y:G@id master: template-master pkg: - name: bash + communityrepo: + enabled: true rootgroup: root service: name: cobblerd @@ -37,4 +38,8 @@ values: source_files: cobbler-config-file-file-managed: - example.tmpl.jinja + cobbler-modules-file-file-managed: + - 'modules.conf.jinja' + cobbler-mongodb-file-file-managed: + - 'mongodb.conf.jinja' winner: pillar diff --git a/test/integration/default/files/_mapdata/fedora-31.yaml b/test/integration/default/files/_mapdata/fedora-31.yaml index acb6faf5..d782615a 100644 --- a/test/integration/default/files/_mapdata/fedora-31.yaml +++ b/test/integration/default/files/_mapdata/fedora-31.yaml @@ -37,4 +37,8 @@ values: source_files: cobbler-config-file-file-managed: - example.tmpl.jinja + cobbler-modules-file-file-managed: + - 'modules.conf.jinja' + cobbler-mongodb-file-file-managed: + - 'mongodb.conf.jinja' winner: pillar diff --git a/test/integration/default/files/_mapdata/fedora-32.yaml b/test/integration/default/files/_mapdata/fedora-32.yaml index 9d16d839..0c2a8e0c 100644 --- a/test/integration/default/files/_mapdata/fedora-32.yaml +++ b/test/integration/default/files/_mapdata/fedora-32.yaml @@ -37,4 +37,8 @@ values: source_files: cobbler-config-file-file-managed: - example.tmpl.jinja + cobbler-modules-file-file-managed: + - 'modules.conf.jinja' + cobbler-mongodb-file-file-managed: + - 'mongodb.conf.jinja' winner: pillar diff --git a/test/integration/default/files/_mapdata/fedora-33.yaml b/test/integration/default/files/_mapdata/fedora-33.yaml index 659f6285..d2fa5787 100644 --- a/test/integration/default/files/_mapdata/fedora-33.yaml +++ b/test/integration/default/files/_mapdata/fedora-33.yaml @@ -37,4 +37,8 @@ values: source_files: cobbler-config-file-file-managed: - example.tmpl.jinja + cobbler-modules-file-file-managed: + - 'modules.conf.jinja' + cobbler-mongodb-file-file-managed: + - 'mongodb.conf.jinja' winner: pillar diff --git a/test/integration/default/files/_mapdata/fedora-34.yaml b/test/integration/default/files/_mapdata/fedora-34.yaml index d14397e3..c9395f13 100644 --- a/test/integration/default/files/_mapdata/fedora-34.yaml +++ b/test/integration/default/files/_mapdata/fedora-34.yaml @@ -37,4 +37,8 @@ values: source_files: cobbler-config-file-file-managed: - example.tmpl.jinja + cobbler-modules-file-file-managed: + - 'modules.conf.jinja' + cobbler-mongodb-file-file-managed: + - 'mongodb.conf.jinja' winner: pillar diff --git a/test/integration/default/files/_mapdata/fedora-35.yaml b/test/integration/default/files/_mapdata/fedora-35.yaml index 49a67b63..46eb413c 100644 --- a/test/integration/default/files/_mapdata/fedora-35.yaml +++ b/test/integration/default/files/_mapdata/fedora-35.yaml @@ -37,4 +37,8 @@ values: source_files: cobbler-config-file-file-managed: - example.tmpl.jinja + cobbler-modules-file-file-managed: + - 'modules.conf.jinja' + cobbler-mongodb-file-file-managed: + - 'mongodb.conf.jinja' winner: pillar diff --git a/test/integration/default/files/_mapdata/fedora-36.yaml b/test/integration/default/files/_mapdata/fedora-36.yaml index 012d269d..635e8c1f 100644 --- a/test/integration/default/files/_mapdata/fedora-36.yaml +++ b/test/integration/default/files/_mapdata/fedora-36.yaml @@ -2,15 +2,45 @@ # Fedora-36 --- values: - added_in_defaults: defaults_value - added_in_lookup: lookup_value - added_in_pillar: pillar_value arch: amd64 - config: /etc/template-formula.conf + authentication: + module: "configfile" + password: "$1$mF86/UHC$WvcIcX2t6crBz2onWxyac." + authorization: + default_ownership: + - "admin" + module: "allowall" + auto_migrate_settings: false + bootloaders: + grub2: + mod_location: "/usr/lib/grub" + ipxe: + enabled: false + location: "/usr/share/ipxe/" + shim: + file: "shim[a-zA-Z0-9]*\\.efi" + location: "/boot/efi/EFI/*/" + syslinux: + location: "/usr/share/syslinux" + memdisk_location: "/usr/share/syslinux" + pxelinux_location: "/usr/share/syslinux" + config: /etc/cobbler/settings.yaml + default_kernel_options: {} + dhcp: + module: "isc" + v4: true + v6: false + dns: + bind: + forward_zones: [] + location: "/var/named" + master: "127.0.0.1" + reverse_zones: [] + enabled: true + module: "bind" lookup: - added_in_lookup: lookup_value - master: template-master - winner: lookup + dhcp: + v4: true map_jinja: sources: - Y:G@osarch @@ -20,7 +50,11 @@ values: - C@cobbler:lookup - C@cobbler - Y:G@id - master: template-master + menu: + enabled: true + nextserver: + v4: "127.0.0.1" + v6: ::1 pkg: communityrepo: enabled: false @@ -31,12 +65,25 @@ values: source: enabled: false version: main + power_management: + default_type: "ipmilanplus" rootgroup: root + rsync: + enabled: false + scm_track: + author: "cobbler " + enabled: false + mode: "git" + push_script: "/bin/true" + server: "127.0.0.1" service: name: cobblerd + tftp: + enabled: true + location: "/var/lib/tftpboot" + module: "in_tftpd" tofs: files_switch: - - any/path/can/be/used/here - id - roles - osfinger @@ -44,5 +91,10 @@ values: - os_family source_files: cobbler-config-file-file-managed: - - example.tmpl.jinja - winner: pillar + - settings.yaml.jinja + cobbler-modules-file-file-managed: + - 'modules.conf.jinja' + cobbler-mongodb-file-file-managed: + - 'mongodb.conf.jinja' + version: 3.3.4 + webdir: "/var/www" diff --git a/test/integration/default/files/_mapdata/opensuse-15.yaml b/test/integration/default/files/_mapdata/opensuse-15.yaml index 421540c9..78de2d14 100644 --- a/test/integration/default/files/_mapdata/opensuse-15.yaml +++ b/test/integration/default/files/_mapdata/opensuse-15.yaml @@ -2,15 +2,45 @@ # Leap-15 --- values: - added_in_defaults: defaults_value - added_in_lookup: lookup_value - added_in_pillar: pillar_value arch: amd64 - config: /etc/template-formula.conf + authentication: + module: "configfile" + password: "$1$mF86/UHC$WvcIcX2t6crBz2onWxyac." + authorization: + default_ownership: + - "admin" + module: "allowall" + auto_migrate_settings: false + bootloaders: + grub2: + mod_location: "/usr/share/grub2" + ipxe: + enabled: false + location: "/usr/share/ipxe/" + shim: + file: shim\.efi + location: "/usr/share/efi/*/" + syslinux: + location: "/usr/share/syslinux" + memdisk_location: "/usr/share/syslinux" + pxelinux_location: "/usr/share/syslinux" + config: /etc/cobbler/settings.yaml + default_kernel_options: {} + dhcp: + module: "isc" + v4: true + v6: false + dns: + bind: + forward_zones: [] + location: "/var/lib/named" + master: "127.0.0.1" + reverse_zones: [] + enabled: true + module: "bind" lookup: - added_in_lookup: lookup_value - master: template-master - winner: lookup + dhcp: + v4: true map_jinja: sources: - Y:G@osarch @@ -20,7 +50,11 @@ values: - C@cobbler:lookup - C@cobbler - Y:G@id - master: template-master + menu: + enabled: true + nextserver: + v4: "127.0.0.1" + v6: ::1 pkg: communityrepo: enabled: false @@ -31,12 +65,25 @@ values: source: enabled: false version: main + power_management: + default_type: "ipmilanplus" rootgroup: root + rsync: + enabled: false + scm_track: + author: "cobbler " + enabled: false + mode: "git" + push_script: "/bin/true" + server: "127.0.0.1" service: name: cobblerd + tftp: + enabled: true + location: "/srv/tftpboot" + module: "in_tftpd" tofs: files_switch: - - any/path/can/be/used/here - id - roles - osfinger @@ -44,5 +91,10 @@ values: - os_family source_files: cobbler-config-file-file-managed: - - example.tmpl.jinja - winner: pillar + - settings.yaml.jinja + cobbler-modules-file-file-managed: + - 'modules.conf.jinja' + cobbler-mongodb-file-file-managed: + - 'mongodb.conf.jinja' + version: 3.3.4 + webdir: "/srv/www" diff --git a/test/integration/default/files/_mapdata/opensuse-tumbleweed.yaml b/test/integration/default/files/_mapdata/opensuse-tumbleweed.yaml index 8050a7d1..4a24e6c2 100644 --- a/test/integration/default/files/_mapdata/opensuse-tumbleweed.yaml +++ b/test/integration/default/files/_mapdata/opensuse-tumbleweed.yaml @@ -2,15 +2,45 @@ # openSUSE Tumbleweed-yyyymmdd --- values: - added_in_defaults: defaults_value - added_in_lookup: lookup_value - added_in_pillar: pillar_value arch: amd64 - config: /etc/template-formula.conf + authentication: + module: "configfile" + password: "$1$mF86/UHC$WvcIcX2t6crBz2onWxyac." + authorization: + default_ownership: + - "admin" + module: "allowall" + auto_migrate_settings: false + bootloaders: + grub2: + mod_location: "/usr/share/grub2" + ipxe: + enabled: false + location: "/usr/share/ipxe/" + shim: + file: shim\.efi + location: "/usr/share/efi/*/" + syslinux: + location: "/usr/share/syslinux" + memdisk_location: "/usr/share/syslinux" + pxelinux_location: "/usr/share/syslinux" + config: /etc/cobbler/settings.yaml + default_kernel_options: {} + dhcp: + module: "isc" + v4: true + v6: false + dns: + bind: + forward_zones: [] + location: "/var/lib/named" + master: "127.0.0.1" + reverse_zones: [] + enabled: true + module: "bind" lookup: - added_in_lookup: lookup_value - master: template-master - winner: lookup + dhcp: + v4: true map_jinja: sources: - Y:G@osarch @@ -20,7 +50,11 @@ values: - C@cobbler:lookup - C@cobbler - Y:G@id - master: template-master + menu: + enabled: true + nextserver: + v4: "127.0.0.1" + v6: ::1 pkg: communityrepo: enabled: false @@ -31,12 +65,25 @@ values: source: enabled: false version: main + power_management: + default_type: "ipmilanplus" rootgroup: root + rsync: + enabled: false + scm_track: + author: "cobbler " + enabled: false + mode: "git" + push_script: "/bin/true" + server: "127.0.0.1" service: name: cobblerd + tftp: + enabled: true + location: "/srv/tftpboot" + module: "in_tftpd" tofs: files_switch: - - any/path/can/be/used/here - id - roles - osfinger @@ -44,5 +91,10 @@ values: - os_family source_files: cobbler-config-file-file-managed: - - example.tmpl.jinja - winner: pillar + - settings.yaml.jinja + cobbler-modules-file-file-managed: + - 'modules.conf.jinja' + cobbler-mongodb-file-file-managed: + - 'mongodb.conf.jinja' + version: 3.3.4 + webdir: "/srv/www" diff --git a/test/integration/default/files/_mapdata/oraclelinux-7.yaml b/test/integration/default/files/_mapdata/oraclelinux-7.yaml index a7006799..e3e6550d 100644 --- a/test/integration/default/files/_mapdata/oraclelinux-7.yaml +++ b/test/integration/default/files/_mapdata/oraclelinux-7.yaml @@ -37,4 +37,8 @@ values: source_files: cobbler-config-file-file-managed: - example.tmpl.jinja + cobbler-modules-file-file-managed: + - 'modules.conf.jinja' + cobbler-mongodb-file-file-managed: + - 'mongodb.conf.jinja' winner: pillar diff --git a/test/integration/default/files/_mapdata/oraclelinux-8.yaml b/test/integration/default/files/_mapdata/oraclelinux-8.yaml index a36bdc9c..ddeb510e 100644 --- a/test/integration/default/files/_mapdata/oraclelinux-8.yaml +++ b/test/integration/default/files/_mapdata/oraclelinux-8.yaml @@ -37,4 +37,8 @@ values: source_files: cobbler-config-file-file-managed: - example.tmpl.jinja + cobbler-modules-file-file-managed: + - 'modules.conf.jinja' + cobbler-mongodb-file-file-managed: + - 'mongodb.conf.jinja' winner: pillar diff --git a/test/integration/default/files/_mapdata/rockylinux-8.yaml b/test/integration/default/files/_mapdata/rockylinux-8.yaml index 53a200d7..22cee719 100644 --- a/test/integration/default/files/_mapdata/rockylinux-8.yaml +++ b/test/integration/default/files/_mapdata/rockylinux-8.yaml @@ -2,15 +2,45 @@ # Rocky Linux-8 --- values: - added_in_defaults: defaults_value - added_in_lookup: lookup_value - added_in_pillar: pillar_value arch: amd64 - config: /etc/template-formula.conf + authentication: + module: "configfile" + password: "$1$mF86/UHC$WvcIcX2t6crBz2onWxyac." + authorization: + default_ownership: + - "admin" + module: "allowall" + auto_migrate_settings: false + bootloaders: + grub2: + mod_location: "/usr/lib/grub" + ipxe: + enabled: false + location: "/usr/share/ipxe/" + shim: + file: "shim[a-zA-Z0-9]*\\.efi" + location: "/boot/efi/EFI/*/" + syslinux: + location: "/usr/share/syslinux" + memdisk_location: "/usr/share/syslinux" + pxelinux_location: "/usr/share/syslinux" + config: /etc/cobbler/settings.yaml + default_kernel_options: {} + dhcp: + module: "isc" + v4: true + v6: false + dns: + bind: + forward_zones: [] + location: "/var/named" + master: "127.0.0.1" + reverse_zones: [] + enabled: true + module: "bind" lookup: - added_in_lookup: lookup_value - master: template-master - winner: lookup + dhcp: + v4: true map_jinja: sources: - Y:G@osarch @@ -20,7 +50,11 @@ values: - C@cobbler:lookup - C@cobbler - Y:G@id - master: template-master + menu: + enabled: true + nextserver: + v4: "127.0.0.1" + v6: ::1 pkg: communityrepo: enabled: false @@ -31,12 +65,25 @@ values: source: enabled: false version: main + power_management: + default_type: "ipmilanplus" rootgroup: root + rsync: + enabled: false + scm_track: + author: "cobbler " + enabled: false + mode: "git" + push_script: "/bin/true" + server: "127.0.0.1" service: name: cobblerd + tftp: + enabled: true + location: "/var/lib/tftpboot" + module: "in_tftpd" tofs: files_switch: - - any/path/can/be/used/here - id - roles - osfinger @@ -44,5 +91,10 @@ values: - os_family source_files: cobbler-config-file-file-managed: - - example.tmpl.jinja - winner: pillar + - settings.yaml.jinja + cobbler-modules-file-file-managed: + - 'modules.conf.jinja' + cobbler-mongodb-file-file-managed: + - 'mongodb.conf.jinja' + version: 3.2.2 + webdir: "/var/www" diff --git a/test/integration/default/files/_mapdata/ubuntu-16.yaml b/test/integration/default/files/_mapdata/ubuntu-16.yaml index cc3febcb..a3658bbb 100644 --- a/test/integration/default/files/_mapdata/ubuntu-16.yaml +++ b/test/integration/default/files/_mapdata/ubuntu-16.yaml @@ -37,4 +37,8 @@ values: source_files: cobbler-config-file-file-managed: - example.tmpl.jinja + cobbler-modules-file-file-managed: + - 'modules.conf.jinja' + cobbler-mongodb-file-file-managed: + - 'mongodb.conf.jinja' winner: pillar diff --git a/test/integration/default/files/_mapdata/ubuntu-18.yaml b/test/integration/default/files/_mapdata/ubuntu-18.yaml index 0afe85ce..76acd548 100644 --- a/test/integration/default/files/_mapdata/ubuntu-18.yaml +++ b/test/integration/default/files/_mapdata/ubuntu-18.yaml @@ -37,4 +37,8 @@ values: source_files: cobbler-config-file-file-managed: - example.tmpl.jinja + cobbler-modules-file-file-managed: + - 'modules.conf.jinja' + cobbler-mongodb-file-file-managed: + - 'mongodb.conf.jinja' winner: pillar diff --git a/test/integration/default/files/_mapdata/ubuntu-20.yaml b/test/integration/default/files/_mapdata/ubuntu-20.yaml index bd685b15..8c51f068 100644 --- a/test/integration/default/files/_mapdata/ubuntu-20.yaml +++ b/test/integration/default/files/_mapdata/ubuntu-20.yaml @@ -37,4 +37,8 @@ values: source_files: cobbler-config-file-file-managed: - example.tmpl.jinja + cobbler-modules-file-file-managed: + - 'modules.conf.jinja' + cobbler-mongodb-file-file-managed: + - 'mongodb.conf.jinja' winner: pillar diff --git a/test/integration/default/files/_mapdata/ubuntu-22.yaml b/test/integration/default/files/_mapdata/ubuntu-22.yaml index a353f5ef..5f0bd3a8 100644 --- a/test/integration/default/files/_mapdata/ubuntu-22.yaml +++ b/test/integration/default/files/_mapdata/ubuntu-22.yaml @@ -2,15 +2,45 @@ # Ubuntu-22.04 --- values: - added_in_defaults: defaults_value - added_in_lookup: lookup_value - added_in_pillar: pillar_value arch: amd64 - config: /etc/template-formula.conf + authentication: + module: "configfile" + password: "$1$mF86/UHC$WvcIcX2t6crBz2onWxyac." + authorization: + default_ownership: + - "admin" + module: "allowall" + auto_migrate_settings: false + bootloaders: + grub2: + mod_location: "/usr/share/grub2" + ipxe: + enabled: false + location: "/usr/lib/ipxe/" + shim: + file: "shim.*\\.efi\\.signed" + location: "/usr/lib/shim/" + syslinux: + location: "/usr/lib/syslinux/modules/bios/" + memdisk_location: "/usr/share/syslinux" + pxelinux_location: "/usr/share/syslinux" + config: /etc/cobbler/settings.yaml + default_kernel_options: {} + dhcp: + module: "isc" + v4: true + v6: false + dns: + bind: + forward_zones: [] + location: "/etc/bind/db." + master: "127.0.0.1" + reverse_zones: [] + enabled: true + module: "bind" lookup: - added_in_lookup: lookup_value - master: template-master - winner: lookup + dhcp: + v4: true map_jinja: sources: - Y:G@osarch @@ -20,7 +50,11 @@ values: - C@cobbler:lookup - C@cobbler - Y:G@id - master: template-master + menu: + enabled: true + nextserver: + v4: "127.0.0.1" + v6: ::1 pkg: communityrepo: enabled: true @@ -31,12 +65,25 @@ values: source: enabled: false version: main + power_management: + default_type: "ipmilanplus" rootgroup: root + rsync: + enabled: false + scm_track: + author: "cobbler " + enabled: false + mode: "git" + push_script: "/bin/true" + server: "127.0.0.1" service: name: cobblerd + tftp: + enabled: true + location: "/var/lib/tftpboot" + module: "in_tftpd" tofs: files_switch: - - any/path/can/be/used/here - id - roles - osfinger @@ -44,5 +91,10 @@ values: - os_family source_files: cobbler-config-file-file-managed: - - example.tmpl.jinja - winner: pillar + - settings.yaml.jinja + cobbler-modules-file-file-managed: + - 'modules.conf.jinja' + cobbler-mongodb-file-file-managed: + - 'mongodb.conf.jinja' + version: 3.3.4 + webdir: "/var/www" diff --git a/test/salt/pillar/default.sls b/test/salt/pillar/default.sls index 1a6d4644..f1a78c12 100644 --- a/test/salt/pillar/default.sls +++ b/test/salt/pillar/default.sls @@ -2,13 +2,12 @@ # vim: ft=yaml --- cobbler: + # Lookup dictionary lookup: - master: template-master - # Just for testing purposes - winner: lookup - added_in_lookup: lookup_value - - config: /etc/template-formula.conf + dhcp: + v4: true + dns: + enabled: true tofs: # The files_switch key serves as a selector for alternative @@ -17,7 +16,6 @@ cobbler: # Note: Any value not evaluated by `config.get` will be used literally. # This can be used to set custom paths, as many levels deep as required. files_switch: - - any/path/can/be/used/here - id - roles - osfinger @@ -41,8 +39,8 @@ cobbler: # For testing purposes source_files: cobbler-config-file-file-managed: - - 'example.tmpl.jinja' - - # Just for testing purposes - winner: pillar - added_in_pillar: pillar_value + - 'settings.yaml.jinja' + cobbler-modules-file-file-managed: + - 'modules.conf.jinja' + cobbler-mongodb-file-file-managed: + - 'mongodb.conf.jinja' diff --git a/test/salt/pillar/upstart.sls b/test/salt/pillar/upstart.sls index e4580998..460d970d 100644 --- a/test/salt/pillar/upstart.sls +++ b/test/salt/pillar/upstart.sls @@ -21,7 +21,6 @@ cobbler: # Note: Any value not evaluated by `config.get` will be used literally. # This can be used to set custom paths, as many levels deep as required. files_switch: - - any/path/can/be/used/here - id - roles - osfinger @@ -43,7 +42,7 @@ cobbler: # For testing purposes source_files: cobbler-config-file-file-managed: - - 'example.tmpl.jinja' + - 'settings.yaml.jinja' # Just for testing purposes winner: pillar