Message from discussion
Dynamic list of files managed from hiera
Received: by 10.58.170.6 with SMTP id ai6mr14218463vec.35.1351776952788;
Thu, 01 Nov 2012 06:35:52 -0700 (PDT)
X-BeenThere: puppet-users@googlegroups.com
Received: by 10.52.16.79 with SMTP id e15ls2189549vdd.6.gmail; Thu, 01 Nov
2012 06:35:46 -0700 (PDT)
Received: by 10.52.37.12 with SMTP id u12mr7443428vdj.8.1351776946897;
Thu, 01 Nov 2012 06:35:46 -0700 (PDT)
Date: Thu, 1 Nov 2012 06:35:46 -0700 (PDT)
From: Guillem Liarte <guillem.lia...@googlemail.com>
To: puppet-users@googlegroups.com
Message-Id: <7f54c1b5-ce11-441f-9ff4-438d66e1cce2@googlegroups.com>
Subject: Dynamic list of files managed from hiera
MIME-Version: 1.0
Content-Type: multipart/mixed;
boundary="----=_Part_188_18783078.1351776946335"
------=_Part_188_18783078.1351776946335
Content-Type: multipart/alternative;
boundary="----=_Part_189_7109230.1351776946335"
------=_Part_189_7109230.1351776946335
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
All,
I use hiera in an straight way, for example:
---
mode: '0644'
that makes easy to do:
file { somefile:
mode => hiera('mode')
}
So far so good. But what about more complex structures? I would liek to be
able to handle hashes of data like this:
in yaml:
---
file_list:
- file1:
fname: 'config.conf'
fpath: '/path/to/destination/'
fmode: '640'
fowner: 'sam'
fgroup: 'admin'
- file2:
fname: 'parameters.xml'
fpath: '/path/to/destination/'
fmode: '660'
fowner: 'tom'
fgroup: 'finance'
Is it possible to handle this right now? What can I do in order to get a
list of items that contain attributes? I understand taht this type of
parsing happens for example when an ENC produces YAML in this way:
clasees:
myapp:
parameter1: 'value1'
parameter2: 'value2'
Can I do something similar to this with puppet-hiera?
And also, is the a decent piece of *documentation* for hiera and
hiera-puppet? there seems to be almost nothing but fragmented
documentation. I am happy top read and research all this in my own but I
have struggled finding documentation.
Many thanks in advance!
Guillem
------=_Part_189_7109230.1351776946335
Content-Type: text/html; charset=utf-8
Content-Transfer-Encoding: quoted-printable
<br>All,<br><br>I use hiera in an straight way, for example:<br><br>---<br>=
mode: '0644'<br><br>that makes easy to do:<br><br>file { somefile:<br> =
; mode =3D> hiera('mode')<br>} <br><br><br>So far so good. =
But what about more complex structures? I would liek to be able to handle h=
ashes of data like this:<br><br>in yaml:<br><br>---<br>file_list:<br> =
- file1:<br> fname: 'config.conf=
' <br> fpath: '/path/to/destination/'<br>&nbs=
p; fmode: '640'<br> f=
owner: 'sam'<br> fgroup: 'admin'<br> - =
file2:<br> fname: 'parameters.xml'<br> &=
nbsp; fpath: '/path/to/destination/'<br>  =
; fmode: '660'<br> fowner: =
'tom'<br> fgroup: 'finance'<br><br><br>=
Is it possible to handle this right now? What can I do in order to get a li=
st of items that contain attributes? I understand taht this type of p=
arsing happens for example when an ENC produces YAML in this way:<br><br>cl=
asees:<br> myapp:<br> parameter1:=
'value1'<br> parameter2: 'value2'<br><br>Can=
I do something similar to this with puppet-hiera?<br><br>And also, is the =
a decent piece of <b>documentation</b> for hiera and hiera-puppet? there se=
ems to be almost nothing but fragmented documentation. I am happy top read =
and research all this in my own but I have struggled finding documentation.=
<br><br><br>Many thanks in advance!<br><br><br>Guillem<br><br>
------=_Part_189_7109230.1351776946335--
------=_Part_188_18783078.1351776946335--