Skip to content
This repository has been archived by the owner on Jul 25, 2018. It is now read-only.

Allow empty instance name to configure the default /etc/httpd directory #126

Open
tterrace opened this issue Nov 8, 2017 · 1 comment
Open

Comments

@tterrace
Copy link

tterrace commented Nov 8, 2017

Cookbook version

0.6.1

Chef-client version

12.x

Platform Details

RHEL

Scenario:

I'm upgrading a fleet of machines from 2.2 to 2.4 and in order to maintain compatibility with existing tools I'd like to keep the service name as "httpd", so all configuration would go in /etc/httpd/, and the init.d script would be /etc/init.d/httpd instead of /etc/init.d/httpd-<whatever>.

Judging by the following helper method that's used by httpd_service and httpd_config I don't think that's currently possible:

      def apache_name
        "httpd-#{instance}"
      end

Ideally I'd like something like this:

# installs default 2.4 in /etc/httpd
httpd_service do
  action "create"
end

# adds vhost config in /etc/httpd/conf.d
httpd_config "example" do
    instance ""
    source ...
    template ...
end

# drop off the wsgi.load in /etc/init.d/conf.modules.d
httpd_module "wsgi" do
    instance "" 
    action "create"
end
@wahlstedtw
Copy link

This seems like it would be the default as well. It's not very clear in the documentation that its creating a separate process and config path httpd-default as the default instance. I'm not sure what the reasoning behind making it separate for a default install.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

2 participants