How can I add a directory to webserver.conf?

asked 2018-11-24 22:44:10 -0600

Spindizzy gravatar image

I want to use the built-in nginx server to serve a small collection of RPM files to my nodes.

Previously I did this by adding a symbolic link to the /opt/puppetlabs/server/data/packages/public directory that pointed to the directory containing the RPM files; but due to code changes attempting to eliminate other problems, I ended up with a dependency cycle, so I had to find another way.

I found the /etc/puppetlabs/puppetserver/conf.d/webserver.conf file, and tried adding another entry to the 'static-content' section of the 8140 server.

static-content: [
        "follow-links": true,
        "path": "/myrpms",
       "resource": "/var/project/rpms"

Unfortunately, puppet automatically removed that entry.

How do I do this the right way, preferably without adding any new services?

edit retag flag offensive close merge delete


Well, you definitely cannot do it the way I wanted to. The contents of the `static-content` element in the `webserver.conf` file are *hard coded* in the `puppet_enterprise::profile::master` class definition. You cannot override them, so you cannot add any additional directories.

Spindizzy gravatar imageSpindizzy ( 2018-11-25 18:31:05 -0600 )edit