Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add CentOS Stream 9 provisioning using theforeman.foreman modules #1856

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions playbooks/foreman_provisioning.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@
become: true
vars:
libvirt_tftp: true
module_defaults:
group/theforeman.foreman.foreman:
username: admin
password: changeme
server_url: "https://localhost/"
validate_certs: false
roles:
- foreman
- libvirt
Expand Down
3 changes: 3 additions & 0 deletions requirements.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
collections:
- name: https://github.com/theforeman/foreman-ansible-modules.git
type: git

- name: https://github.com/theforeman/foreman-operations-collection
type: git

Expand Down
21 changes: 21 additions & 0 deletions roles/foreman_provisioning/tasks/configure_centos_9.yml
evgeni marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
- name: "Ensure CentOS Stream 9" # noqa: args[module]
theforeman.foreman.operatingsystem:
evgeni marked this conversation as resolved.
Show resolved Hide resolved
name: CentOS_Stream
family: Redhat
major: 9
architectures:
- x86_64
media:
- CentOS Stream 9 mirror
provisioning_templates:
- Kickstart default
ptables:
- Kickstart default
state: present

- name: "Set default template for CentOS Stream 9" # noqa: args[module]
theforeman.foreman.os_default_template:
operatingsystem: "CentOS_Stream 9"
template_kind: "provision"
provisioning_template: "Kickstart default"
state: present
4 changes: 2 additions & 2 deletions roles/foreman_provisioning/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
- name: 'Setup CentOS 7 provisioning'
import_tasks: configure_centos_7.yml
- name: 'Setup CentOS 9 provisioning'
import_tasks: configure_centos_9.yml

- name: 'Setup Fedora 27 provisioning'
import_tasks: configure_fedora_27.yml
Expand Down