On Wed, Feb 15, 2012 at 6:49 PM, jcbollinger wrote:
> $v = $::some_unsafe_value
> $v_safe = inline_template("<% require 'shellwords' %><%=
> shellwords.escape(v) %>")
Cool. It *is* possible. Didn't think to consider using a template...
> Overall, however, I suspect that you are probing a rather
Thanks, John, for your reply also on this matter!
On Feb 15, 3:16 pm, jcbollinger wrote:
> It seems like this should do the trick:
> puppet -e '$v="xyz" exec { f: command => "/bin/echo v is \'$v\'",
> logoutput => true }'
:-) Yeah, that would take care of these particular instances.
Now imagine
http://docs.puppetlabs.com/man/apply.html does not mention a --noop
parameter, but it works:
capmon@peter:~> puppet apply --noop -e 'file { "/tmp/foo": ensure => present }'
notice: /Stage[main]//File[/tmp/foo]/ensure: is absent, should be present (noop)
Can I rely on this in future versions? If s
If I have a "simple" variable value, this works fine:
capmon@peter:~> puppet -e '$v="xyz" exec { f: command => "/bin/echo v
is $v", logoutput => true }'
notice: /Stage[main]//Exec[f]/returns: v is xyz
notice: /Stage[main]//Exec[f]/returns: executed successfully
But how do I escape "bad" values of
When a *nix command fails, it most often prints an error to STDERR:
capmon@peter:~> /bin/rm /nonexist
/bin/rm: cannot remove `/nonexist': No such file or directory
exec's logoutput => true doesn't capture STDERR by default:
capmon@peter:~> puppet -e 'exec { e: command => "/bin/rm /nonexist",
lo
On Thu, Feb 9, 2012 at 6:07 PM, jcbollinger wrote:
> It precisely describes the user configuration you want to achieve, and
> the 'allowdupe' should enable it to work. Supposing that users 'fred'
> and 'barney' are initially present with swapped UIDs, you should
> transiently have a situation whe
On Wed, Feb 8, 2012 at 4:23 PM, jcbollinger wrote:
> To give you a good answer, I need to understand this a bit better, and
> I'm having trouble with that statement. On Unix-like systems the user
> name is the primary identifier, and UIDs are only secondary. It is
> even possible for two or more
On Wed, Feb 8, 2012 at 3:12 PM, Dan White wrote:
> First trick with users across multiple machines is to have the same userid
> for the same login.
I'm not sure I understand. I read this as a suggestion to make it
impossible to rename a user. "First trick is to change the
requirements" ;-) Did
Hi,
Being a newbie, I'm trying to wrap my head around puppet. Here are my
first stumbling blocks:
We have an output from a database which is essentially a list of users
that we want to manage in the uid 2001-2999 range:
* No other users may be present in that range (puppet should delete them)
*