Project

General

Profile

Actions

Bug #10119

closed

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

Added by Anonymous over 9 years ago. Updated almost 8 years ago.

Status:
Rejected
Priority:
Normal
Assignee:
-
Category:
Templates
Target version:
-
Difficulty:
Triaged:
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 2 (0 open2 closed)

Related to Foreman - Feature #12396: Realm snippet not expanded when previewing provisioning templateClosedStephen Benjamin11/04/2015Actions
Related to Foreman - Bug #17292: HOST[OTP] is not correctly rendered in user-dataClosedActions
Actions

Also available in: Atom PDF