Skip to content

Commit

Permalink
Associate more templates with CentOS Stream
Browse files Browse the repository at this point in the history
  • Loading branch information
adamruzicka authored and ekohl committed Dec 3, 2024
1 parent 197dc7d commit 1de43eb
Showing 1 changed file with 26 additions and 5 deletions.
31 changes: 26 additions & 5 deletions roles/foreman_provisioning/tasks/configure_centos_9.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,23 @@
- name: 'Set templates fact'
set_fact:
templates:
- kind: 'host_init_config'
name: 'Linux host_init_config default'
- kind: 'provision'
name: 'Kickstart default'
- kind: 'PXEGrub'
name: 'Kickstart default PXEGrub'
- kind: 'PXEGrub2'
name: 'Kickstart default PXEGrub2'
- kind: 'PXELinux'
name: 'Kickstart default PXELinux'
- kind: 'finish'
name: 'Kickstart default finish'
- kind: 'iPXE'
name: 'Kickstart default iPXE'
- kind: 'user_data'
name: 'Kickstart default user data'

- name: "Ensure CentOS Stream 9" # noqa: args[module]
theforeman.foreman.operatingsystem:
name: CentOS_Stream
Expand All @@ -7,15 +27,16 @@
- x86_64
media:
- CentOS Stream 9 mirror
provisioning_templates:
- Kickstart default
provisioning_templates: "{{ templates | map(attribute='name') }}"
ptables:
- Kickstart default
state: present
password_hash: "SHA256"

- name: "Set default template for CentOS Stream 9" # noqa: args[module]
- name: "Set default templates for CentOS Stream 9" # noqa: args[module]
theforeman.foreman.os_default_template:
operatingsystem: "CentOS_Stream 9"
template_kind: "provision"
provisioning_template: "Kickstart default"
template_kind: "{{ item.kind }}"
provisioning_template: "{{ item.name }}"
state: present
loop: "{{ templates }}"

0 comments on commit 1de43eb

Please sign in to comment.