Project

General

Profile

Actions

Feature #1482

closed

allow lookup of foreman settings from templates

Added by Adrian Bridgett over 12 years ago. Updated almost 12 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

I'd like to be able to lookup foreman settings from within the unattended install templates (finish.sh, puppet.conf in particular). I've had a try at adding it, however my ruby skills are too poor at this stage.

As background, the reason why I'm adding this is because is because otherwise I'm unable to build a host.

If I set a host as follows:
Puppet Master Proxy: blank
Puppet Master FQDN: puppet.example.com

Then provisioning fails (when getting the debian preseed file) with:
provisioning fails "Managing Puppet CA without a smart-proxy will not be supported in the next release" (but we are managing puppet CA, it's puppet we weren't - and even if I then change the smart-proxy to managing puppet I still get this error).

However if I set a host with:
Puppet Master Proxy: Foreman proxy

then although the preseed part of provisioning works, puppet.conf and finish.sh fail as they use foreman-proxy.example.com as the puppetmaster rather than puppet.example.com.

this is all on foreman v0.4.1-1

Actions #1

Updated by Ohad Levy over 12 years ago

OK - please
  1. open a new bug about the above issue
  2. you can try using Setting.<setting_name> and you should get the value, most likely you would need to turn off safe mode rendering
  3. close the ticket if you are OK with the above :)
Actions #2

Updated by Adrian Bridgett over 12 years ago

2) works a treat, thanks Ohad!

I'm happy with it, I've added it to http://theforeman.org/projects/foreman/wiki/TemplateWriting

Actions #3

Updated by Adrian Bridgett over 12 years ago

I don't think I have permissions to mark this resolved sadly. Either that or I just can't find how!

Actions #4

Updated by Ohad Levy almost 12 years ago

  • Status changed from New to Resolved
Actions

Also available in: Atom PDF