There should be a way to add arbitrary fragments to local_settings.py

Bug #1383500 reported by Mathieu Gagné
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
puppet-horizon
Fix Released
Medium
Mathieu Gagné

Bug Description

The local_settings.py file is managed using a template. While this is an appropriate way to manage this kind of file, it leaves no flexibility when it comes to adding arbitrary configurations to it.

One would have to override the whole template using the local_settings_template parameter and replace it by his own to accomplish it. This is an extreme solution and shouldn't be the only one available.

Using the puppetlabs-concat module to allow introduce of custom fragments might be a good alternative. This would also add the ability for someone to add arbitrary Python code and imports, allowing further customization of an Horizon installation.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to puppet-horizon (master)

Fix proposed to branch: master
Review: https://review.openstack.org/129743

Changed in puppet-horizon:
assignee: nobody → Mathieu Gagné (mgagne)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to puppet-horizon (master)

Reviewed: https://review.openstack.org/129743
Committed: https://git.openstack.org/cgit/stackforge/puppet-horizon/commit/?id=d63e437bdfbdb0ddf6bd50ae06d43ebbb263a157
Submitter: Jenkins
Branch: master

commit d63e437bdfbdb0ddf6bd50ae06d43ebbb263a157
Author: Mathieu Gagné <email address hidden>
Date: Mon Oct 20 17:45:21 2014 -0400

    Use concat to manage local_settings.py

    Manage local_settings.py content with concat::fragment.

    This adds the ability for anyone to add custom fragments
    to local_settings.py without having to override the template.

    Example on how to use concat::fragment:

      concat::fragment { 'local_settings.py:custom':
        target => $::horizon::params::config_file,
        content => 'HORIZON_CONFIG["customization_module"] = "my_project.overrides"',
        order => '90'
      }

    The use of puppetlabs-concat does not break backward compatibility
    for those establishing relationships with the file resource
    that used to be local_settings.py. puppetlabs-concat still declares
    a file resource matching the concat resource title when
    a concat resource is created.

    Closes-bug: #1383500
    Change-Id: I97e747c967dddc04b62ff1d31440e42a26dcb3ff

Changed in puppet-horizon:
status: In Progress → Fix Committed
Mathieu Gagné (mgagne)
Changed in puppet-horizon:
milestone: none → 6.0.0
Changed in puppet-horizon:
importance: Undecided → Medium
Mathieu Gagné (mgagne)
Changed in puppet-horizon:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.