Skip to content
Draft
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
4 changes: 2 additions & 2 deletions Puppetfile
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,5 @@ mod 'theforeman/puppet', :git => 'https://github.com/theforeman/pu

# Top-level katello modules
mod 'katello/foreman_proxy_content', :git => 'https://github.com/theforeman/puppet-foreman_proxy_content'
mod 'katello/certs', :git => 'https://github.com/theforeman/puppet-certs'
mod 'katello/katello', :git => 'https://github.com/theforeman/puppet-katello'
mod 'katello/certs', :git => 'https://github.com/ehelms/puppet-certs', branch: 'add-generate'
mod 'katello/katello', :git => 'https://github.com/theforeman/puppet-katello', branch: 'frankenstein'
77 changes: 2 additions & 75 deletions config/katello-answers.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,78 +9,8 @@
#
# See params.pp in each class for what options are available
---
certs:
group: foreman
foreman:
client_ssl_ca: /etc/foreman/proxy_ca.pem
client_ssl_cert: /etc/foreman/client_cert.pem
client_ssl_key: /etc/foreman/client_key.pem
initial_location: Default Location
initial_organization: Default Organization
server_ssl_ca: /etc/pki/katello/certs/katello-default-ca.crt
server_ssl_cert: /etc/pki/katello/certs/katello-apache.crt
server_ssl_chain: /etc/pki/katello/certs/katello-server-ca.crt
server_ssl_crl: ""
server_ssl_key: /etc/pki/katello/private/katello-apache.key
foreman::cli: true
foreman::cli::ansible: false
foreman::cli::azure: false
foreman::cli::bootdisk: false
foreman::cli::discovery: false
foreman::cli::google: false
foreman::cli::katello: true
foreman::cli::kubevirt: false
foreman::cli::openscap: false
foreman::cli::puppet: false
foreman::cli::remote_execution: true
foreman::cli::resource_quota: false
foreman::cli::rh_cloud: false
foreman::cli::ssh: false
foreman::cli::tasks: false
foreman::cli::templates: false
foreman::cli::virt_who_configure: false
foreman::cli::webhooks: false
foreman::compute::ec2: false
foreman::compute::libvirt: false
foreman::compute::openstack: false
foreman::compute::ovirt: false
foreman::compute::vmware: false
foreman::plugin::acd: false
foreman::plugin::ansible: false
foreman::plugin::azure: false
foreman::plugin::bootdisk: false
foreman::plugin::default_hostgroup: false
foreman::plugin::dhcp_browser: false
foreman::plugin::discovery: false
foreman::plugin::dlm: false
foreman::plugin::expire_hosts: false
foreman::plugin::git_templates: false
foreman::plugin::google: false
foreman::plugin::hdm: false
foreman::plugin::kernel_care: false
foreman::plugin::kubevirt: false
foreman::plugin::leapp: false
foreman::plugin::monitoring: false
foreman::plugin::netbox: false
foreman::plugin::openscap: false
foreman::plugin::proxmox: false
foreman::plugin::puppet: false
foreman::plugin::puppetdb: false
foreman::plugin::remote_execution: true
foreman::plugin::remote_execution::cockpit: false
foreman::plugin::rescue: false
foreman::plugin::resource_quota: false
foreman::plugin::rh_cloud: false
foreman::plugin::salt: false
foreman::plugin::scc_manager: false
foreman::plugin::snapshot_management: false
foreman::plugin::statistics: false
foreman::plugin::tasks: true
foreman::plugin::templates: false
foreman::plugin::vault: false
foreman::plugin::virt_who_configure: false
foreman::plugin::webhooks: false
foreman::plugin::wreckingball: false
certs::deploy:
foreman_proxy: true
foreman_proxy:
foreman_ssl_ca: /etc/foreman-proxy/foreman_ssl_ca.pem
foreman_ssl_cert: /etc/foreman-proxy/foreman_ssl_cert.pem
Expand All @@ -106,7 +36,4 @@ foreman_proxy::plugin::openscap: false
foreman_proxy::plugin::remote_execution::script: false
foreman_proxy::plugin::salt: false
foreman_proxy::plugin::shellhooks: false
foreman_proxy_content: true
katello: true
puppet: false
apache::mod::status: false
3 changes: 3 additions & 0 deletions config/katello.migrations/250226000000-frankenstein.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
answers.delete_if do |key, _value|
['foreman', 'foreman_proxy_content', 'apache::mod::status'].include?(key) || key.start_with?('foreman::')
end
3 changes: 0 additions & 3 deletions config/katello.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,8 @@

:order:
- certs
- foreman
- katello
- foreman_proxy
- foreman_proxy::plugin::pulp
- foreman_proxy_content
- puppet

# If using the Debian ruby-kafo package, uncomment this
Expand Down
11 changes: 0 additions & 11 deletions hooks/pre/33-pulpcore_assets_permissions.rb

This file was deleted.

13 changes: 0 additions & 13 deletions hooks/pre/34-pulpcore_directory_layout.rb

This file was deleted.

34 changes: 34 additions & 0 deletions hooks/pre/40-exacto.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
def apply_installer_puppet(manifest)
bin_path = Kafo::PuppetCommand.search_puppet_path('puppet')
command = "echo \"#{manifest}\" | #{bin_path} apply --detailed-exitcodes --modulepath=/usr/share/foreman-installer/modules"

stdout, stderr, status = Open3.capture3(*Kafo::PuppetCommand.format_command(command))
if status != 1
puts stdout
else
puts stderr
end
end

generate_manifest = <<~MANIFEST
class { 'certs::generate':
foreman => true,
apache => true,
candlepin => true,
foreman_proxy => true,
}
MANIFEST

apply_installer_puppet(generate_manifest)

system('dnf -y install ansible-core git-core podman python3-cryptography python3-libsemanage python3-requests bash-completion nmap python3.12-psycopg2 python3.12-requests')

Dir.chdir('/opt') do
system('git clone https://github.com/theforeman/foreman-quadlet')
end

Dir.chdir('/opt/foreman-quadlet') do
system('git checkout installer-certs')
system('ansible-galaxy install -r requirements.yml')
status = system('ansible-playbook playbooks/deploy.yaml -e certificate_source=installer')
end
2 changes: 1 addition & 1 deletion hooks/pre_commit/13-tuning.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
EXIT_INSUFFICIENT_MEMORY = 103

current_tuning = get_custom_fact(TUNING_FACT)
if module_enabled?('foreman')
if module_enabled?('foreman') || module_enabled?('katello')
new_tuning = app_value(:tuning)
else
new_tuning = current_tuning
Expand Down
12 changes: 0 additions & 12 deletions hooks/pre_commit/33-pulpcore_assets_permissions.rb

This file was deleted.