Forge Home

dconf

Install and configure dconf

676 downloads

98 latest version

5.0 quality score

We run a couple of automated
scans to help you access a
module's quality. Each module is
given a score based on how well
the author has formatted their
code and documentation and
modules are also checked for
malware using VirusTotal.

Please note, the information below
is for guidance only and neither of
these methods should be considered
an endorsement by Puppet.

Version information

  • 0.2.2 (latest)
  • 0.2.1
  • 0.2.0
  • 0.1.1
  • 0.1.0
released Aug 6th 2024
This version is compatible with:
  • Puppet Enterprise 2023.8.x, 2023.7.x, 2023.6.x, 2023.5.x, 2023.4.x, 2023.3.x, 2023.2.x, 2023.1.x, 2023.0.x, 2021.7.x, 2021.6.x, 2021.5.x, 2021.4.x, 2021.3.x, 2021.2.x, 2021.1.x, 2021.0.x, 2019.8.x
  • Puppet >= 6.21.0 < 9.0.0
  • , , , ,

Start using this module

  • r10k or Code Manager
  • Bolt
  • Manual installation
  • Direct download

Add this module to your Puppetfile:

mod 'jmckenzie-dconf', '0.2.2'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add jmckenzie-dconf
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install jmckenzie-dconf --version 0.2.2

Direct download is not typically how you would use a Puppet module to manage your infrastructure, but you may want to download the module in order to inspect the code.

Download
Tags: gnome, gdm, dconf

Documentation

jmckenzie/dconf — version 0.2.2 Aug 6th 2024

dconf

Table of Contents

  1. Description
  2. Setup - The basics of getting started with dconf
  3. Usage - Configuration options and additional functionality
  4. Limitations - OS compatibility, etc.
  5. Development - Guide for contributing to the module

Description

This module will install dconf and allow you to manage GNOME desktop environment via Puppet.

Setup

What dconf affects

  • dconf package
  • dconf profiles under /etc/dconf/profile/
  • dconf db files under /etc/dconf/db/
  • dconf db lock files under /etc/dconf/db/YOUR_PROFILE/locks/

Setup Requirements

See module dependencies for more details.

Beginning with dconf

For basic use of this module, first make sure the module is installed on your puppet-server, then add the following to your manifest:

include dconf

On its own, this will simply install the dconf packages for your distro.

Usage

Include usage examples for common use cases in the Usage section. Show your users how to use your module to solve problems, and be sure to include code examples. Include three to five examples of the most important or common tasks a user can accomplish with your module. Show users how to accomplish more complex tasks that involve different types, classes, and functions working in tandem.

Creating a dconf profile

dconf::profile { 'user':
  entries => {
    'user' => {
      'type'  => 'user',
      'order' => 10,
     },
    'local' => {
      'type'  => 'system',
      'order' => 21,
    },
    'site' => {
      'type'  => 'system',
      'order' => 22,
    },
  },
}

Will result in the following profile at /etc/dconf/profile/user

user-db:user
system-db:local
system-db:site

Creating a dconf settings file with locks

dconf::db { 'local':
  settings => {
    'system/proxy/http' => {
      'host' => '172.16.0.1',
      'enabled' => 'true',
    },
  locks => [
    '/system/proxy/http/host',
    '/system/proxy/http/enabled',
  ],

Will result in the following dconf database structure:

/etc/dconf/
|-- db
|   |-- local
|   `-- local.d
|       |-- 00-default
|       `-- locks
|           `-- 00-default

local.d/00-default

[system/proxy/http]
host = '172.16.0.1'
enabled = true

local.d/locks/00-default

/system/proxy/http/enabled
/system/proxy/http/host

Configure dconf with hiera

This module can also be configured entirely using hiera. To configure the above with hiera, use the following snippet:

dconf::profiles:
  'user':
    entries:
      'user':
        type: 'user'
        order: 10
      'local':
        type: 'system'
        order: 21
      'site':
        type: 'system'
        order 22
dconf::dbs:
  'local':
    settings:
      'system/proxy/http':
        'host': "'172.16.0.1'"
        'enabled': 'true'
    locks:
      - '/system/proxy/http/host'
      - '/system/proxy/http/enabled'

Note that some dconf values must be double quoted to ensure the resulting dconf ini keyfile contains the correct data.

Removing dconf profiles and databases

To remove dconf profiles and databases, you can use the ensure parameter.

Resource declaration

dconf::profile { 'user':
  ensure => 'absent',
}
dconf::db { 'local':
  ensure => 'absent',
}

Hiera declaration

dconf::profiles:
  'user':
    ensure: 'absent'
dconf::dbs:
  'local':
    ensure: 'absent'

Ensuring the absence of a dconf database will cause the db file, db directory, and associated locks to all be removed. If you just want to remove the locks you can supply an empty array for the resource:

dconf::dbs:
  'local':
    locks: []

Limitations

No known limitations

Development

When contributing, please check your code conforms to the Puppet language style guide: https://www.puppet.com/docs/puppet/latest/style_guide.html