FAQ
Hello,

I'm working on execution of puppet's "puppet cert generate
...--dns_alt_names=name1,name2,name2" using Puppet 2.7.19 and didn't find a
way to figure out the following:

I'd prefer to keep the list of "dns_alt_names" in a puppet array and join()
them when I build the command string.

E.g.
$dns_alt_names = [ 'name1', 'name2', ...]
$command = "puppet cert generate ... --dns_alt_names=" <what goes here?>
join($dns_alt_names, ',').

But I didn't find a way to concatenate the output of the join() call to the
string before it.

A couple of ways I though that might allow this are:

1. Set a temporary variable with the output of join() and interpolate it
into the command with "...${temp_var}"
2. Use inline_template()

Are these the only viable ways to achieve that?

For now I keep the names in a single string, but I think this is less
maintainable than using an array.

Thanks,

--Amos

--
You received this message because you are subscribed to the Google Groups "Puppet Users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/zXOjvdCcUj4J.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.

Search Discussions

  • Krzysztof Wilczynski at Oct 6, 2012 at 7:03 pm
    Hey,

    I think, you might be over-thinking this a little :)

    KW
    On Saturday, October 6, 2012 11:41:09 AM UTC+1, Amos Shapira wrote:

    Hello,

    I'm working on execution of puppet's "puppet cert generate
    ...--dns_alt_names=name1,name2,name2" using Puppet 2.7.19 and didn't find a
    way to figure out the following:

    I'd prefer to keep the list of "dns_alt_names" in a puppet array and
    join() them when I build the command string.

    E.g.
    $dns_alt_names = [ 'name1', 'name2', ...]
    $command = "puppet cert generate ... --dns_alt_names=" <what goes here?>
    join($dns_alt_names, ',').

    But I didn't find a way to concatenate the output of the join() call to
    the string before it.

    A couple of ways I though that might allow this are:

    1. Set a temporary variable with the output of join() and interpolate
    it into the command with "...${temp_var}"
    2. Use inline_template()

    Are these the only viable ways to achieve that?

    For now I keep the names in a single string, but I think this is less
    maintainable than using an array.

    Thanks,

    --Amos
    --
    You received this message because you are subscribed to the Google Groups "Puppet Users" group.
    To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/BQk8gDzRKmMJ.
    To post to this group, send email to puppet-users@googlegroups.com.
    To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com.
    For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
  • Jcbollinger at Oct 8, 2012 at 1:20 pm

    On Saturday, October 6, 2012 5:41:09 AM UTC-5, Amos Shapira wrote:
    Hello,

    I'm working on execution of puppet's "puppet cert generate
    ...--dns_alt_names=name1,name2,name2" using Puppet 2.7.19 and didn't find a
    way to figure out the following:

    I'd prefer to keep the list of "dns_alt_names" in a puppet array and
    join() them when I build the command string.

    E.g.
    $dns_alt_names = [ 'name1', 'name2', ...]
    $command = "puppet cert generate ... --dns_alt_names=" <what goes here?>
    join($dns_alt_names, ',').

    So, this sort of one-time provisioning task is not the sort of thing I
    would normally look to automate via Puppet.


    But I didn't find a way to concatenate the output of the join() call to
    the string before it.

    A couple of ways I though that might allow this are:

    1. Set a temporary variable with the output of join() and interpolate
    it into the command with "...${temp_var}"
    2. Use inline_template()

    Are these the only viable ways to achieve that?
    No, but they're probably the easiest and best.


    John

    --
    You received this message because you are subscribed to the Google Groups "Puppet Users" group.
    To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/b0-3Uv3sKxcJ.
    To post to this group, send email to puppet-users@googlegroups.com.
    To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com.
    For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppuppet-users @
categoriespuppet
postedOct 6, '12 at 10:41a
activeOct 8, '12 at 1:20p
posts3
users3
websitepuppetlabs.com

People

Translate

site design / logo © 2022 Grokbase