Hello All,

I've run into an issue where an array that's being passed into a
defined type is being "flattened" when it's inclosed in double quotes
and I'm not sure how to get around this. This is happening a the
pdxcat/amanda module and I've raised an github issues for this but
wanted to query the community as a whole. The issue and my branch of
the code are below.

The amanda::server or amanda::configs class/defined type allow you to
populate amanda configuration directories from files,
/etc/amanda/$configs, by setting configs => [ "daily", "weekly" ] in
the manifest. In my defined type, amanda::disklist, the parameter
$configs needs to be used to set the correct target path to a file
which I'm using contact::fragment to modify. When $configs is a single
value, say "daily", everything works as expected. But then $configs is
an array, "daily" and "weekly", it's flattened to "dailyweekly" which
results in an "Invalid relationship:" error.

Can anyone provide some guidance on how to get around this? I've been
banging on this for a few days and my heads really starting to hurt.

define amanda::disklist (
    $configs,
    $diskdevice = undef,
    $dumptype,
    $ensure     = present,
    $interface  = undef,
    $order      = 20,
    $spindle    = undef
    ) {
    include amanda::params
    include amanda::virtual

    concat::fragment { "amanda::disklist/$title":
        target  => "$amanda::params::configs_directory/$configs/disklist",
        ensure  => $ensure,
        order   => $order,
        content => "$fqdn $name $diskdevice $dumptype $spindle $interface\n",
        tag     => "amanda_dle",
    }

https://github.com/pdxcat/puppet-module-amanda/issues/12
https://github.com/deadpoint/puppet-amanda/tree/disklist

--
Later,
Darin

-- 
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 [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to