From 3d8816d8f58a1c3fc68fb4fafb9be7e188b2a466 Mon Sep 17 00:00:00 2001 From: Steven Pritchard Date: Fri, 23 Oct 2026 16:37:42 +0000 Subject: [PATCH 1/4] Explicitly set the agent `server` setting for OpenVox 9 OpenVox 9 no longer falls back to `puppet` when `server` is unset, so the `role` plan now sets `server` in the `main` section of `puppet.conf` on every target right after the agent is installed. It defaults to the FQDN of `server_target` and can be overridden with the new `openvox_server` plan parameter. Co-Authored-By: Claude Opus 5.5 --- site/role/REFERENCE.md | 10 ++++++++++ site/role/plans/init.pp | 19 +++++++++++++++++++ 2 files changed, 29 insertions(+) diff --git a/site/role/REFERENCE.md b/site/role/REFERENCE.md index e12fad8..37cb227 100644 --- a/site/role/REFERENCE.md +++ b/site/role/REFERENCE.md @@ -56,6 +56,7 @@ The following parameters are available in the `role` plan: * [`openvox_agent`](#-role--openvox_agent) * [`targets`](#-role--targets) * [`server_target`](#-role--server_target) +* [`openvox_server`](#-role--openvox_server) * [`control_repo`](#-role--control_repo) * [`choria_user`](#-role--choria_user) @@ -113,6 +114,15 @@ The puppet server target Default value: `'puppet'` +##### `openvox_server` + +Data type: `Optional[String[1]]` + +The value of `server` in the agents' `puppet.conf`. Defaults to the FQDN of +`server_target`. (OpenVox 9 no longer defaults `server` to `puppet`.) + +Default value: `undef` + ##### `control_repo` Data type: diff --git a/site/role/plans/init.pp b/site/role/plans/init.pp index 7debf4c..3e726ab 100644 --- a/site/role/plans/init.pp +++ b/site/role/plans/init.pp @@ -7,6 +7,9 @@ # @param openvox_agent The name of the openvox-agent package # @param targets The targets to run on # @param server_target The puppet server target +# @param openvox_server +# The value of `server` in the agents' `puppet.conf`. Defaults to the FQDN of +# `server_target`. (OpenVox 9 no longer defaults `server` to `puppet`.) # @param control_repo URL of the control repo # @param choria_user User name of the demo choria user on the Puppet server plan role ( @@ -17,6 +20,7 @@ String[1] $openvox_agent = 'openvox-agent', TargetSpec $targets = 'all', TargetSpec $server_target = 'puppet', + Optional[String[1]] $openvox_server = undef, Variant[ Stdlib::HTTPUrl, Pattern[/\Afile:\/\/\/([^\n\/\0]+(\/)?)+\z/] @@ -43,6 +47,21 @@ # installed and collect facts. apply_prep($targets) + # OpenVox 9 no longer falls back to `puppet` when `server` is unset, + # so set it explicitly on every target. + $server = $openvox_server ? { + undef => get_targets($server_target)[0].facts['networking']['fqdn'], + default => $openvox_server, + } + run_command( + "puppet config set server ${server} --section main", + $targets, + "Setting server to ${server}", + '_env_vars' => { + 'PATH' => '/opt/puppetlabs/bin:/bin:/usr/bin', + }, + ) + # Use the collected facts to build a hash of `host` resources. $hosts = get_targets($targets).reduce({}) |$memo, $target| { $this_host = { From 406a460dae17b8bc0266d0e518e5ff21868bc7c4 Mon Sep 17 00:00:00 2001 From: Steven Pritchard Date: Fri, 23 Oct 2026 16:49:41 +0000 Subject: [PATCH 2/4] Test with OpenVox 9 instead of the OpenVox 9 preview Now that the openvox 9 gem is released, replace the "OpenVox 8 + Ruby 4.0" preview entry in the spec matrix with OpenVox 9 on Ruby 4.0. Co-Authored-By: Claude Opus 5.5 --- .github/workflows/pr.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 8d0a1a1..9bade09 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -51,8 +51,8 @@ jobs: - label: 'OpenVox 8' openvox_version: '~> 8' ruby_version: '3.2' - - label: 'OpenVox 9 Preview (OpenVox 8 + Ruby 4.0)' - openvox_version: '~> 8' + - label: 'OpenVox 9' + openvox_version: '~> 9' ruby_version: '4.0' env: OPENVOX_GEM_VERSION: ${{matrix.openvox.openvox_version}} From c9bff82db71d5275f0f7bfb7d32871284fe35f46 Mon Sep 17 00:00:00 2001 From: Steven Pritchard Date: Fri, 23 Oct 2026 17:49:38 +0000 Subject: [PATCH 3/4] Set Choria's ssldir explicitly for OpenVox 9 Choria before 0.30.3 finds Puppet's ssldir by running `puppet apply --configprint ssldir`. OpenVox 9 removed `--configprint`, so choria-server and choria-broker exit at startup. Setting `plugin.choria.ssldir` stops Choria from asking Puppet. The fix (choria-io/go-choria#2362) is in v0.30.3, but the newest package in the Choria yum repo is still 0.30.2. Co-Authored-By: Claude Opus 5.5 --- data/common.yaml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/data/common.yaml b/data/common.yaml index b6d6827..0499ea5 100644 --- a/data/common.yaml +++ b/data/common.yaml @@ -22,4 +22,9 @@ puppetdb::puppetdb_package: 'openvoxdb' puppetdb::master::config::terminus_package: 'openvoxdb-termini' choria::manage_package_repo: true +# Choria before 0.30.3 looks up `ssldir` with `puppet apply --configprint`, +# which OpenVox 9 removed. Setting it explicitly skips that lookup. +choria::server_config: + plugin.choria.ssldir: /etc/puppetlabs/puppet/ssl +choria::broker::ssldir: /etc/puppetlabs/puppet/ssl choria::broker::network_broker: true From dec343d9c727dbce53eeb0b4aa5de36ef4f2d931 Mon Sep 17 00:00:00 2001 From: Steven Pritchard Date: Fri, 23 Oct 2026 17:49:38 +0000 Subject: [PATCH 4/4] Default to OpenVox 9 Change the default OPENVOX_RELEASE from 8 to 9 in the Vagrantfile and the serverspec tests, and update the README. Co-Authored-By: Claude Opus 5.5 --- README.md | 2 +- Vagrantfile | 2 +- spec/puppet/sample_spec.rb | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 21cbbdb..7a98fbe 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,7 @@ The following environment variables are used to configure the Vagrant environmen | -------------------- | ------------- | ----------- | | `IP_SUBNET` | `192.168.32` | The internal IP subnet used by Vagrant | | `OPENVOX_VERSION` | none (use the latest) | The OpenVox agent version | -| `OPENVOX_RELEASE` | `8` | The OpenVox major release version | +| `OPENVOX_RELEASE` | `9` | The OpenVox major release version | | `EL_RELEASE` | `9` | The EL release of the base box | | `EL_OS_NAME` | `centos` | The base box OS | | `BOX` | Depends on EL_OS_NAME | The base box name | diff --git a/Vagrantfile b/Vagrantfile index cb9ec3a..58e553e 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -4,7 +4,7 @@ ENV['VAGRANT_EXPERIMENTAL'] = 'typed_triggers' ip_subnet = ENV.fetch('IP_SUBNET', '192.168.32') openvox_version = ENV.fetch('OPENVOX_VERSION', '') -openvox_release = openvox_version.empty? ? ENV.fetch('OPENVOX_RELEASE', '8') : openvox_version.split('.').first +openvox_release = openvox_version.empty? ? ENV.fetch('OPENVOX_RELEASE', '9') : openvox_version.split('.').first el_release = ENV.fetch('EL_RELEASE', '9') el_os_name = ENV.fetch('EL_OS_NAME', 'centos') def select_box(el_os_name, el_release) diff --git a/spec/puppet/sample_spec.rb b/spec/puppet/sample_spec.rb index 0b2b33f..fa20f47 100644 --- a/spec/puppet/sample_spec.rb +++ b/spec/puppet/sample_spec.rb @@ -3,7 +3,7 @@ require 'spec_helper' openvox_version = ENV.fetch('OPENVOX_VERSION', '') -openvox_release = openvox_version.empty? ? ENV.fetch('OPENVOX_RELEASE', '8') : openvox_version.split('.').first +openvox_release = openvox_version.empty? ? ENV.fetch('OPENVOX_RELEASE', '9') : openvox_version.split('.').first describe 'server' do # Verify the physical setup of the server