Changeset 736


Ignore:
Timestamp:
May 17, 2010, 6:15:58 PM (11 years ago)
Author:
josx@…
Message:

Mejorando el codigo para agregar una preferencia a thunderbird

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/puppet/modules/puppet-escritorio/manifests/classes/tbconf.pp

    r735 r736  
    2929class escritorio::tb3conf {
    3030    include escritorio::tb
    31     file { "/etc/thunderbird/pref/thunderbird.js": ensure => present, checksum => mtime }
    32     line { globalindexoff:
    33        file => "/etc/thunderbird/pref/thunderbird.js",
    34        line => 'pref("mailnews.database.global.indexer.enabled", true);',
    35        ensure => absent,
    36        require => Package["thunderbird"]
     31
     32    define add_pref($pref_present, $pref_absent) {
     33        file { "/etc/thunderbird/pref/thunderbird.js": ensure => present, checksum => mtime }
     34        line { "off$pref_absent":
     35            file => "/etc/thunderbird/pref/thunderbird.js",
     36            line => $pref_absent,
     37            ensure => absent,
     38            require => Package["thunderbird"]
     39        }
     40        line { "on$pref_present":
     41            file => "/etc/thunderbird/pref/thunderbird.js",
     42            line => $pref_present,
     43            ensure => present,
     44            require => Package["thunderbird"]
     45        }
    3746    }
    38     line { globalindexon:
    39        file => "/etc/thunderbird/pref/thunderbird.js",
    40        line => 'pref("mailnews.database.global.indexer.enabled", false);',
    41        ensure => present,
    42        require => Package["thunderbird"]
     47
     48    add_pref {  "prefencias":
     49        pref_present => 'pref("mailnews.database.global.indexer.enabled", false);',
     50        pref_absent =>  'pref("mailnews.database.global.indexer.enabled", true);'
    4351    }
     52
    4453}
    4554
Note: See TracChangeset for help on using the changeset viewer.