Skip to content

Tag: puppet

retrieve fact info based on variable in puppet

I have these facts: So with the main_ip fact I need to retrieve the interface that host it. I have try the following to compare the ip: but I cannot retrieve the value of the fact with the variable i’m giving… Can you please advice me how to find the value of the fact with the variable information…

Puppet – How to purge a directory

A bit of a Puppet newbie here. I am trying to recursively purge all files and directories under /var/www except keep one file present (/var/www/html/appicon.ico). This is my code: The code does appear to purge all files and directories, except for other files under /var/www/html. Any thoughts what I am doing …

Can resource attributes depend on file-presence?

I’m writing a module, that will provide for mirrored yum-repositories on our network. The single server will host the mirrors offering them to other hosts (and itself). I have a problem with the initial chicken-and-egg — the first download may not happen for a while, but, if I enable a new reposit…

Puppet referring to a module inside a module

I’m using Puppet 3.5.1 on Linux 6 machine. I have a local module “A” that includes a sub-module “B”. Such that sub-module “B” is located in “/etc/puppet/modules/A/modules/B”. I refer to sub-module “B” in my module “A” classes: (/etc…

Managing a user password for linux in puppet

I need to create a test user with a password using puppet. I’ve read that puppet cannot manage user passwords in a generic cross-platform way, which is a pity. I am doing this for Red Hat Enterprise Linux Server release 6.3. I do as follows: puppet updates the password of the user, but Linux says login/…