[Mageia-dev] puppet and the urpmi config

Guillaume Rousse guillomovitch at gmail.com
Wed Jul 18 18:34:08 CEST 2012


Le 18/07/2012 17:39, Olivier Thauvin a écrit :
> * Guillaume Rousse (guillomovitch at gmail.com) wrote:
>> Le 18/07/2012 14:29, Olivier Thauvin a écrit :
>>> Ideas and patches welcome.
>> You shouldn't overwrite any file managed locally, but interact with it
>> using expected interface. For urpmi, it just requires to check if the
>> media you are interested in is already present, and otherwise call
>> urpmi.addmedia for adding it. I don't have any puppet-ready solution for
>> it, but I don't think that's really difficult to reproduce.
>
> A real solution would be urpmi make a real difference between
> configuration and state data.
> At time it write things in both /etc/urpmi and /var/lib/urpmi, even
> there is no change real change in urpmi.cfg.
Right, but that's outside the scope of your problem. And urpmi.cfg is 
the only example of such a scenario. Just imagine managing /etc/passwd, 
for instance.

> Such plugin for puppet must be written in ruby, I haven't plan to learn
> ruby right now.
You don't need any plugin to run a grep command, and take a decision 
based on its output status. And if there is some code to write, that 
would rather be an augeas lense to avoid the need of using grep (I've no 
clue about the difficulty, tough).

> I will also argue the media name is not enough to ensure the urpmi
> config use the right distro on the server I want.
Indeed. You need to grep for more than the media name, then.

-- 
BOFH excuse #321:

Scheduled global CPU outage


More information about the Mageia-dev mailing list