Worked for me:

<% if @host.facts['productname'] =~ /^ProLiant DL360 G(6|7|8)$/ -%>
part /              --size=1 --grow --fstype ext4 --ondisk=sda
part swap           --size=8192 --ondisk=sda
part /var/lib/mysql --size=1 --grow --asprimary --ondisk=sdb
<% end -%>

Thank you!!!

Am Montag, 19. Dezember 2016 16:46:09 UTC+1 schrieb Jason B. Nance:
>
> Give one of these methods a try:
>
>
> https://stackoverflow.com/questions/2113235/ruby-is-a-string-in-a-list-of-values
>
> ------------------------------
> *From: *"'Denis Müller' via Foreman users" <forema...@googlegroups.com 
> <javascript:>>
> *To: *"Foreman users" <forema...@googlegroups.com <javascript:>>
> *Sent: *Monday, December 19, 2016 9:35:07 AM
> *Subject: *[foreman-users] Custom Partition Table
>
> Hi guys,
> we would woulk like to do this:
>
> <% if @host.facts['Productname'] == ''ProLiant DL360 G7" -%> < How can we 
> provide multiply strings like G7,G8,G9?
> part /                          --size=1 --grow --fstype ext4 --ondisk=sda
> part swap                  --size=8192 --ondisk=sda
> part /var/lib/mysql    --size=1 --grow --asprimary --ondisk=sdb
> <% end -%>
>
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Foreman users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to foreman-user...@googlegroups.com <javascript:>.
> To post to this group, send email to forema...@googlegroups.com 
> <javascript:>.
> Visit this group at https://groups.google.com/group/foreman-users.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Foreman users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to foreman-users+unsubscr...@googlegroups.com.
To post to this group, send email to foreman-users@googlegroups.com.
Visit this group at https://groups.google.com/group/foreman-users.
For more options, visit https://groups.google.com/d/optout.

Reply via email to