Hi,

I'm looking into a way to manage the SugarCRM config.php (see partial 
example below this message). This proposes several problems:
1. The file is full of arrays and arrays-in-arrays (So I think Augeas is 
useless, as far as I understand it)
2. Not all config.php's contain the same arrays and/or key-value 
combinations. It's possible that in one config.php a certain arrays is 
needed, while it isn't in another and that teh value of a certain key needs 
to be different and is set from SugarCRM. So to summarize: I don't want to 
manage every array and key/value in config.php. (So I think and 
config.erb-template is out of the question)
3. I could use exec with sed and for every array and key/value I need to 
manage, but that would probably make it quite complex (if possible at all), 
as I need to check for existance first, and depending on the outcome, add 
the array or key/value or change the existing pair.

The way I used to do this was manage config_override.php, in which you can 
specify arrays and key/values which override the ones in config.php, with 
an erb template. Problem with that, is that when you change something in 
the SugarCRM-interface, it 's added/changed in config_override.php. Which 
is then regularly overwritten by Puppet, so the change is reverted.

Does anyone have a good suggestion to manage this file reliably and with 
reasonable complexity with Puppet?

-----
Example file (partial):
<?php
$sugar_config = array (
  'Reschedule' => 
  array (
    'version' => '2.0',
  ),
  'SAML_X509Cert' => '',
  'SAML_loginurl' => '',
  'addAjaxBannedModules' => 
  array (
    0 => 'AOS_Contracts',
    1 => 'AOS_Invoices',
    2 => 'AOS_Quotes',
    3 => 'AOS_PDF_Templates',
    4 => 'asol_Reports',
    5 => 'Accounts',
    6 => 'Contacts',
    7 => 'Leads',
    8 => 'Prospects',
  ),
  'admin_access_control' => false,
  'admin_export_only' => false,
  'aos' => 
  array (
    'version' => '5.3.2',
    'contracts' => 
    array (
      'renewalReminderPeriod' => '14',
    ),
    'lineItems' => 
    array (
      'totalTax' => false,
      'enableGroups' => true,
    ),
    'invoices' => 
    array (
      'initialNumber' => '1',
    ),
    'quotes' => 
    array (
      'initialNumber' => '1',
    ),
  ),
  'authenticationClass' => '',
  'cache_dir' => 'cache/',
  'calculate_response_time' => true,
...
...
);

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/e7c27236-f397-471e-b0ad-8e881e016a4b%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to