Puppet/hieradata

26 views
Skip to first unread message

Albert Shih

unread,
Sep 14, 2016, 11:54:08 AM9/14/16
to puppet...@googlegroups.com
Hi everyone

I got a webapplication who need two servers (one master, one slave) to run.

For the webapplication I need a list of extension. So I get

XXXXXXXX::extensions:
- extension1
- extension2


On the master from that list I need to install those extension

ensure_packages (extension1)
ensure_packages (extension2)

and on the slave I need to do

ensure_packages (extension1-template)
ensure_packages (extension2-template)

and I cannot install the extension1 (not template) on the slave.

If find 3 way to do that

1/ If I create a profile like

profile::master::extensions

I would need to access hiera('profile::master::extension') from
profile::slave::extension, and people say that's « bad ».

2/ The other solution I see is to put

webapplication::extensions

and access that from both master/slave, people say that's bad.

3/ The third solution is to create

profile::webapplication::extensions

and a boolean

profile::webapplication::is_master

but I don't find that nice because I need both load the slave profile AND
pass the is_master to false. That's mean duplicate the information.

Any other solution ? what would you do ? Any advise what's best ?

Regards

JAS


--
Albert SHIH
DIO bâtiment 15
Observatoire de Paris
5 Place Jules Janssen
92195 Meudon Cedex
France
Téléphone : +33 1 45 07 76 26/+33 6 86 69 95 71
xmpp: j...@obspm.fr
Heure local/Local time:
mer 14 sep 2016 17:41:29 CEST

Angel L. Mateo

unread,
Sep 15, 2016, 2:30:11 AM9/15/16
to puppet...@googlegroups.com
If using puppet 4 you could iterate with XXXX::extensions. If you use
$package in the iteration, in the master you ensure_package $package and
in the slave "${package}-template".

El 14/09/16 a las 17:53, Albert Shih escribió:
--
Angel L. Mateo Martínez
Sección de Telemática
Área de Tecnologías de la Información
y las Comunicaciones Aplicadas (ATICA)
http://www.um.es/atica
Tfo: 868889150
Fax: 868888337
Reply all
Reply to author
Forward
0 new messages