Project

General

Profile

Bug #10119

@host.otp isn't detemplated in user-data

Added by Michael Moll about 5 years ago. Updated over 3 years ago.

Status:
Rejected
Priority:
Normal
Assignee:
-
Category:
Templates
Target version:
-
Difficulty:
Triaged:
No
Bugzilla link:
Pull request:
Fixed in Releases:
Found in Releases:

Description

(copied over from https://github.com/theforeman/community-templates/issues/169)

I am using user-data templates on ec2 and @host.otp is not populated.

In the first case the value is simply blank, but when I get the user-data using curl the otp is there. This is on foreman 1.7

Workaround:

IPAOTP=<%= @host.otp %> # this line isnt detemplted correctly unless we get it from curl
curl <%= foreman_url("user_data")%> | grep ^IPAOTP > /var/log/otp.log
.  /var/log/otp.log
# snip
/usr/sbin/ipa-client-install -w ${IPAOTP} --no-dns-sshfp --domain=$domain --realm=<%= @host.realm %> -f -U --server <%= @host.params['freeipa_servers'].split('%%').first %> $freeipa_mkhomedir


Related issues

Related to Foreman - Feature #12396: Realm snippet not expanded when previewing provisioning templateClosed2015-11-04
Related to Foreman - Bug #17292: HOST[OTP] is not correctly rendered in user-dataClosed

History

#1 Updated by Stephen Benjamin about 5 years ago

  • Bugzilla link set to 1187520

#2 Updated by Dominic Cleal about 5 years ago

  • Category set to Templates

#3 Updated by Michael Moll over 4 years ago

  • Is duplicate of Feature #12396: Realm snippet not expanded when previewing provisioning template added

#4 Updated by Michael Moll over 4 years ago

  • Is duplicate of deleted (Feature #12396: Realm snippet not expanded when previewing provisioning template)

#5 Updated by Michael Moll over 4 years ago

  • Related to Feature #12396: Realm snippet not expanded when previewing provisioning template added

#6 Updated by Michael Moll over 4 years ago

  • Assignee set to Stephen Benjamin

Stephen, could you have a look if that's also resolved by the fix for #12396?

#7 Updated by Stephen Benjamin over 4 years ago

  • Bugzilla link deleted (1187520)

Removing the bugzilla since it's wrong, it belonged with #12396.

Our user data templates don't include freeipa at all actually, although the finish template does.

But anyway, is the issue that the OTP never gets set when provisioning an image-based host or you just don't see it in the preview? If it's the latter case you can see how we solved it in the other templates for #12396.

#8 Updated by Stephen Benjamin over 3 years ago

  • Status changed from New to Need more information
  • Assignee deleted (Stephen Benjamin)

See question above

#9 Updated by Michael Moll over 3 years ago

  • Status changed from Need more information to Closed

OP never responded

#10 Updated by Dominic Cleal over 3 years ago

  • Status changed from Closed to Rejected

#11 Updated by Maxim Burgerhout over 3 years ago

  • Related to Bug #17292: HOST[OTP] is not correctly rendered in user-data added

Also available in: Atom PDF