Puppet newbie question about facts and config files

23 views
Skip to first unread message

RG

unread,
Aug 2, 2017, 11:15:37 AM8/2/17
to Puppet Users
I am trying to write my first puppet module.

I need to be able to pull a value from a custom fact and write a value in a config file based on a value in the fact.

Can I do and "if-then" statement  like in bash?

Thanks for any guidance.


David Schmitt

unread,
Aug 2, 2017, 2:06:44 PM8/2/17
to Puppet Users
Hi,

On 2 August 2017 at 16:15, RG <andyse...@gmail.com> wrote:
I am trying to write my first puppet module.

I need to be able to pull a value from a custom fact and write a value in a config file based on a value in the fact.

Can I do and "if-then" statement  like in bash?

Yes! See https://docs.puppet.com/puppet/5.0/lang_conditional.html for the details. The first example on that page even uses facts to decide.


Cheers, David
 

Thanks for any guidance.


--
You received this message because you are subscribed to the Google Groups "Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/45e2fa45-1114-487d-afae-d5b17097045a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages