Hi,
It seems you are thinking that puppet is like other scripting language, but it is not. With puppet you define a final state, a model, so there is not "first I exec this, get the output and do something".
If you ask how to get a date to model something, I would answer just use (custom) facts. But I think that the best question is why do you need that?
Regards,
--
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...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/b1100867-b76c-4a5c-8663-96e03dbc04b8%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
Hi,
It seems you are thinking that puppet is like other scripting language, but it is not. With puppet you define a final state, a model, so there is not "first I exec this, get the output and do something".
If you ask how to get a date to model something, I would answer just use (custom) facts. But I think that the best question is why do you need that?
Regards,
El 01/02/2014 17:15, "jyotir bhandari" <jyotirb...@gmail.com> escribió:
--
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...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/b1100867-b76c-4a5c-8663-96e03dbc04b8%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
I don't understand why the epoch_date fact doesn't work, why you cannot use the user resource? If it is because the password is enforced, you can use the user resource to create the user, and launch a chpasswd once created to setup the initial password.
Regards.
P.N. just realized the emails were sent just to me, please keep the group in copy.
JyotirI have my master server on CentOS 5 and clients on Ubuntu 12.04HiI tried ${::epoch_date}, mistakenly i wrote with (). still it didnt work.I have tried with the link of user resources, but it didnt work for me that is why i went with this approach.RegardsOn Sun, Feb 2, 2014 at 9:29 PM, José Luis Ledesma <joseluis...@gmail.com> wrote:Hi,
First of all, which platform are you using? If it is linux, hpux, Solaris... you should use the 'user' resource:
http://docs.puppetlabs.com/references/latest/type.html
About using the epoch_date fact it is ${::epoch_date} note its {} and not ().
Regards,
El 02/02/2014 16:50, "jyotir bhandari" <jyotirb...@gmail.com> escribió:
I tried to set password with libshadow too, but it didnt work for me, so i went with this approach, but now that hash is setting up, it is not setting epoch days, though i can hard code it but i want it to be correct as we can know when was the user actually created.'HiJust tried as per your guidance $(::epoch_date), it didnt work, epoch_date field is not showing up in the shadow fields.
Please guide me as to what is the best approach.RegardsJyotirOn Sun, Feb 2, 2014 at 1:35 PM, José Luis Ledesma <joseluis...@gmail.com> wrote:
I supose that user resource do not work for you, right? ( note that the link is an historic information, and perhaps puppet currently supports your platform)
Have you tried ${::epoch_date}?
Regards,
El 02/02/2014 05:59, "jyotir bhandari" <jyotirb...@gmail.com> escribió:
Hi
Why don't you use inline_template and call a ruby function that returns what you want?