Smart-proxy on second VLAN

Problem:
I need to be able to provision virtual machines on two different VLANS. Looks like the best way to do this is to to have a secondary smart-proxy running on the second VLAN. I’m getting a puppet version error that I have googled and found others to have but I’m unable to resolve.

I’ve build a second server called foreman-proxy.example.com to run DHCP, DNS, and TFTP. Based on the 3.13 manual:

  1. Added repos and foreman package
  2. Added OAuth to environment variables
  3. Bootstrapped a certificate for the server from foreman.example.com
  4. trying to only install DHCP, DNS, and TFTP services with foreman-installer. Here is where I’m running into issues with puppet, which I do not want/need installed on this server. Install flags are based on the 'Installation Scenarios - Smart proxy for DNS, DHCP etc."
2025-02-06 14:50:03 [NOTICE] [root] Loading installer configuration. This will take some time.
2025-02-06 14:50:06 [NOTICE] [root] Running installer with log based terminal output at level NOTICE.
2025-02-06 14:50:06 [NOTICE] [root] Use -l to set the terminal output log level to ERROR, WARN, NOTICE, INFO, or DEBUG. See --full-help for definitions.
2025-02-06 14:50:07 [NOTICE] [checks] System checks passed
2025-02-06 14:50:08 [NOTICE] [configure] Starting system configuration.
2025-02-06 14:50:10 [ERROR ] [configure] Evaluation Error: Error while evaluating a Resource Statement, Evaluation Error: Unknown variable: 'foreman::plugin_version'. (file: /usr/share/foreman-installer/modules/foreman/manifests/plugin.pp, line: 24, column: 24) (file: /usr/share/foreman-installer/modules/foreman/manifests/plugin/puppet.pp, line: 6) on node foreman-proxy.example.com
2025-02-06 14:50:10 [NOTICE] [configure] System configuration has finished.

There were errors detected during installation.
Please address the errors and re-run the installer to ensure the system is properly configured.
Failing to do so is likely to result in broken functionality.

The full log is at /var/log/foreman-installer/foreman.log
-bash: --no-enable-foreman-puppet: command not found
[root@foreman-proxy ~]#

.
Expected outcome:
Have PXE booting on secondary VLAN with stand alone smart-proxy server.

Foreman and Proxy versions:
foreman .example.com

  • foreman-release-3.13.0-1.el9.noarch
  • foreman-installer-3.13.0-1.el9.noarch
  • foreman-selinux-3.13.0-1.el9.noarch
  • foreman-3.13.0-1.el9.noarch
  • foreman-postgresql-3.13.0-1.el9.noarch
  • foreman-service-3.13.0-1.el9.noarch
  • foreman-dynflow-sidekiq-3.13.0-1.el9.noarch
  • foreman-redis-3.13.0-1.el9.noarch
  • foreman-proxy-3.13.0-1.el9.noarch
  • rubygem-hammer_cli_foreman-3.13.0-1.el9.noarch
  • foreman-cli-3.13.0-1.el9.noarch
  • rubygem-hammer_cli_foreman_puppet-0.1.0-1.fm3_11.el9.noarch
  • rubygem-foreman_puppet-8.0.0-1.fm3_13.el9.noarch

foreman-proxy .example.com:

  • foreman-release-3.13.0-1.el9.noarch
  • foreman-installer-3.13.0-1.el9.noarch
  • foreman-selinux-3.13.0-1.el9.noarch
  • foreman-3.13.0-1.el9.noarch

Foreman and Proxy plugin versions:

Distribution and version:
foreman.example.com - rocky 9.5
foreman-proxy.example.com - rocky 9.5

Other relevant data:
Install command:

foreman-installer \
  --no-enable-foreman \
  --no-enable-puppet \
  --puppet-server=false \
  --foreman-proxy-puppet=false \
  --foreman-proxy-puppetca=false
  --no-enable-foreman-puppet \
  --no-enable-foreman-cli \
  --no-enable-foreman-cli-puppet \
  --enable-foreman-proxy \
  --foreman-proxy-tftp=true \
  --foreman-proxy-dhcp=true \
  --foreman-proxy-dhcp-range="10.0.100.250 10.0.100.254" \
  --foreman-proxy-dhcp-gateway="10.0.100.1" \
  --foreman-proxy-dhcp-nameservers="10.0.100.141,10.0.100.248" \
  --foreman-proxy-dns=true \
  --foreman-proxy-dns-interface=ens33 \
  --foreman-proxy-dns-zone="example.com" \
  --foreman-proxy-dns-reverse="100.0.10.in-addr.arpa" \
  --foreman-proxy-dns-forwarders="10.0.100.248" \
  --foreman-proxy-dns-forwarders="10.0.100.141" \
  --foreman-proxy-foreman-base-url="https://foreman.example.com" \
  --foreman-proxy-trusted-hosts="foreman.example.com" \
  --foreman-proxy-register-in-foreman=true \
  --foreman-proxy-oauth-consumer-key="$OAUTH_KEY" \
  --foreman-proxy-oauth-consumer-secret="$OAUTH_SECRET"

/usr/share/foreman-installer/modules/foreman/manifests/plugin/puppet.pp:

# = Foreman Puppet plugin
#
# This class installs puppet plugin
#
class foreman::plugin::puppet {
  foreman::plugin { 'puppet':
  }
}

You are missing a backslash here. Thats the reason for the bash error (it thinks a new command starts after that) and most likely the reason for the installer error as well (most parameters do not get to the installer, since bash thinks they belong to another command)

@areyus, thanks for the reply. I’ve added the slash to the end of this line and get the same error but without the command not found line.

2025-02-07 09:42:38 [NOTICE] [root] Loading installer configuration. This will take some time.
2025-02-07 09:42:41 [NOTICE] [root] Running installer with log based terminal output at level NOTICE.
2025-02-07 09:42:41 [NOTICE] [root] Use -l to set the terminal output log level to ERROR, WARN, NOTICE, INFO, or DEBUG. See --full-help for definitions.
2025-02-07 09:42:43 [NOTICE] [checks] System checks passed
2025-02-07 09:42:44 [NOTICE] [configure] Starting system configuration.
2025-02-07 09:42:47 [ERROR ] [configure] Evaluation Error: Error while evaluating a Resource Statement, Evaluation Error: Unknown variable: 'foreman::plugin_version'. (file: /usr/share/foreman-installer/modules/foreman/manifests/plugin.pp, line: 24, column: 24) (file: /usr/share/foreman-installer/modules/foreman/manifests/plugin/puppet.pp, line: 6) on node foreman-proxy.example.com
2025-02-07 09:42:47 [NOTICE] [configure] System configuration has finished.

There were errors detected during installation.
Please address the errors and re-run the installer to ensure the system is properly configured.
Failing to do so is likely to result in broken functionality.

The full log is at /var/log/foreman-installer/foreman.log
[root@foreman-proxy ~]#

I’ve also checked the usr/share/foreman-installer/modules/foreman/manifests/plugin.pp on foreman.example.com and it show the same code. Its interesting that I’m flagging it to not install puppet and it has an issue with checking its version.

I was able to resolve this issue by replacing –no-enable-puppet with –no-enable-foreman-plugin-puppet.

1 Like