Skip to content

Add Ansible REX job template for virt-who deployment#236

Open
chris1984 wants to merge 1 commit into
theforeman:mainfrom
chris1984:add-rex-job-template
Open

Add Ansible REX job template for virt-who deployment#236
chris1984 wants to merge 1 commit into
theforeman:mainfrom
chris1984:add-rex-job-template

Conversation

@chris1984

@chris1984 chris1984 commented Jul 16, 2026

Copy link
Copy Markdown
Member

Summary

Adds a Remote Execution (REX) Ansible job template that deploys virt-who configurations directly to hosts from the Foreman UI. This provides an alternative to the existing bash deployment script, following the same pattern used by foreman_rh_cloud for cloud connector.

Changes

  • app/views/job_templates/deploy_virt_who_config.erb — Inline Ansible playbook that handles virt-who installation (with satellite-maintain/foreman-maintain awareness), password encryption, per-config and global config file deployment, and service management
  • db/seeds.d/50_job_templates.rb — Seeds the job template into the database
  • lib/foreman_virt_who_configure/engine.rb — Registers the deploy_virt_who_config RemoteExecutionFeature

Supported hypervisor types

  • ESX (VMware) — tested
  • Hyper-V — tested
  • libvirt — tested
  • kubevirt — config verified, no test environment
  • AHV (Nutanix) — config verified, no test environment

Additional testing

  • HTTP/HTTPS proxy and no_proxy settings — tested
  • Foreman server FQDN is auto-populated via foreman_server_url (no user input required)

How to test

  1. Run foreman-rake db:seed
  2. Navigate to Hosts > Job Templates — "Deploy virt-who Config" should appear
  3. Run the template against a host with the appropriate inputs
  4. Verify config files at /etc/virt-who.d/.conf and /etc/virt-who.conf
  5. Verify virt-who service is enabled and running
virtwho1

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@chris1984
chris1984 force-pushed the add-rex-job-template branch from dc3e6bd to 604d10b Compare July 16, 2026 18:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant