{"id":27958101,"url":"https://github.com/ericsson/puppet-module-gnomish","last_synced_at":"2025-05-07T18:16:22.746Z","repository":{"id":48420723,"uuid":"62869715","full_name":"Ericsson/puppet-module-gnomish","owner":"Ericsson","description":null,"archived":false,"fork":false,"pushed_at":"2024-03-25T11:46:52.000Z","size":104,"stargazers_count":0,"open_issues_count":1,"forks_count":3,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-05-07T18:16:19.156Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Ericsson.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2016-07-08T07:54:07.000Z","updated_at":"2024-03-25T08:38:54.000Z","dependencies_parsed_at":"2023-02-10T16:00:29.616Z","dependency_job_id":"be217e40-fa43-4702-be65-dc8f46406d07","html_url":"https://github.com/Ericsson/puppet-module-gnomish","commit_stats":null,"previous_names":["ericsson/puppet-module-gnomish"],"tags_count":13,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ericsson%2Fpuppet-module-gnomish","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ericsson%2Fpuppet-module-gnomish/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ericsson%2Fpuppet-module-gnomish/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ericsson%2Fpuppet-module-gnomish/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Ericsson","download_url":"https://codeload.github.com/Ericsson/puppet-module-gnomish/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252931508,"owners_count":21827112,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-05-07T18:16:21.933Z","updated_at":"2025-05-07T18:16:22.729Z","avatar_url":"https://github.com/Ericsson.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# puppet-module-gnomish\n\n#### Table of Contents\n\n1. [Module Description](#module-description)\n2. [Compatibility](#compatibility)\n3. [Class Descriptions](#class-descriptions)\n    * [gnomish](#class-gnomish)\n    * [gnomish::gnome](#class-gnomishgnome)\n    * [gnomish::mate](#class-gnomishmate)\n4. [Define Descriptions](#define-descriptions)\n    * [gnomish::application](#defined-type-gnomishapplication)\n    * [gnomish::gnome::gconftool_2](#defined-type-gnomishgnomegconftool_2)\n    * [gnomish::mate::mateconftool_2](#defined-type-gnomishmatemateconftool_2)\n5. [Changelog](#changelog)\n\n# Module description\n\nManage Gnome 2.x \u0026 Mate 1.x Desktop application icons and settings.\n\nWith this module you can create, modify, and remove applications in the desktop menus. You can set system settings, deploy and\nset a wallpaper, and manage packages. You are able to decide if icons and settings are applied to Gnome or Mate only, or to both\ndesktops.\n\nThis module was developed with a focus of using hiera to pass parameters to it. Still it can be used without hiera.\n\nIf you want to rollout an application icon to both desktops, use `$gnomish::applications`. If it should only end up on Gnome use\n`$gnomish::gnome::applications`, for Mate only `$gnomish::mate::applications` is your friend.\n\nThe same is possible with system settings. Use `$gnomish::settings_xml` for both desktops or `$gnomish::gnome::settings_xml` and\n`$gnomish::mate::settings_xml` for the given desktop.\n\n| parameter / desktop          | Gnome | Mate  |\n| :---                         | :---: | :---: |\n| gnomish::applications        | X     | X     |\n| gnomish::settings_xml        | X     | X     |\n| gnomish::gnome::applications | X     |       |\n| gnomish::gnome::settings_xml | X     |       |\n| gnomish::mate::applications  |       | X     |\n| gnomish::mate::settings_xml  |       | X     |\n\n\n\n# Compatibility\n\nThis module has been tested to work on the following systems with Puppet versions 5, 6 and 7 with the Ruby version associated\nwith those releases. This module aims to support the current and previous major Puppet versions.\n\n  * RHEL 6\n  * RHEL 7\n  * SLED 11\n  * SLES 11\n\n[![Build Status](https://travis-ci.org/Phil-Friderici/puppet-module-gnomish.png?branch=master)](https://travis-ci.org/Phil-Friderici/puppet-module-gnomish)\n\n\n# Class Descriptions\n## Class `gnomish`\n\n### Description\n\nThe `gnomish` class is used to configure application icons and settings that are valid for both desktops.\nBesides that, you can also manage wallpaper, packages, and which file to be used to save user settings.\n\n### Parameters\n\n---\n#### applications (hash / optional)\nSpecify applications icons that will be passed to the gnomish::applications defined type. For a full description please read\non at the [application defined type](#defined-type-gnomishapplication).\n\n**Hint**: if you want to pass parameters from manifests, you will need to set `$gnomish::applications_hiera_merge` to *false*.\n\n- Default: ***{}***\n\n##### Example:\n```yaml\ngnomish::applications:\n  'set wallpaper':\n    key:   '/desktop/gnome/background/picture_filename'\n    value: 'wallpaper.png'\n  'authconfig':\n    ensure 'absent'\n```\n---\n#### applications_hiera_merge (boolean / optional)\nIf set to *true* hiera_merge will be used to collect and concatenate applications settings from all applicable hiera levels. If set to\n*false* only the most specific hiera data will be used.\n\n**Hint**: if you want to pass parameters from manifests you will need to set it to *false*.\n\n- Default: ***true***\n\n---\n#### desktop (string / mandatory)\nUsed to decide which desktop should be configured. Valid values are *gnome* and *mate*. Depending on this setting the module will\ninclude the subclass `gnomish::gnome` or `gnomish::mate`.\n\n- Default: ***'gnome'***\n\n---\n#### gconf_name (string / optional)\nThis setting allows you to define system-wide which file should be used to save user settings. With this you can completely separate\nthe settings between desktops and even OS families to avoid spillover effects.\n\n- Default: ***undef***\n\n##### Example:\n```yaml\ngnomish::gconf_name: '$(HOME)/.gconf-redhat'\n```\n---\n#### packages_add (array / optional)\nName of package(s) you want to add. Use to add packages that are needed. Useful to add desktop specific packages.\n\n- Default: ***[]***\n\n##### Example:\n```yaml\ngnomish::packages_add:\n  - 'mc'\n```\n---\n#### packages_remove (array / optional)\nName of package(s) you want to remove. Use to remove packages that are unwanted on a terminal server for example.\n\n- Default: ***[]***\n\n##### Example:\n```yaml\ngnomish::packages_remove:\n  - 'gnome-power-manager'\n```\n---\n#### settings_xml (hash / optional)\nSpecify desktop settings that will be passed to the `gnomish::gnome::gconftool_2` or `gnomish::mate::mateconftool_2` defined\ntypes, depending on the value of `$gnomish::desktop`. For a full description please read on at the\n[gconftool_2](#defined-type-gnomishgnomegconftool_2) or [mateconftools_2](#defined-type-gnomishmatemateconftool_2) defined types.\n\n**Hint**: if you want to pass parameters from manifests you will need to set `$settings_xml_hiera_merge` to *false*.\n\n- Default: ***{}***\n\n##### Example for Gnome and Mate setting:\n```yaml\ngnomish::settings_xml:\n  'set picture_options':\n    key:     '/desktop/gnome/background/picture_options'\n    value:   'zoom'\n```\n---\n#### settings_xml_hiera_merge (boolean / optional)\nIf set to *true* hiera_merge will be used to collect and concatenate desktop settings from all applicable hiera levels. If set to\n*false* only the most specific hiera data will be used.\n\n**Hint**: if you want to pass parameters from manifests you will need to set `$settings_xml_hiera_merge` to *false*.\n\n- Default: ***true***\n\n---\n#### wallpaper_path (string / optional)\nSpecify an absolute path to an image file that should be used as system default background.\n\n- Default: ***undef***\n\n---\n#### wallpaper_source (string / optional)\nWhen set, the module will copy the file from the given source to the path defined in `$gnomish::wallpaper_path` (which obviously\nbecome mandatory then). Takes all values that are valid for the source attribute of a\n[file resource](https://docs.puppet.com/puppet/latest/reference/type.html#file-attribute-source).\n\n- Default: ***undef***\n\n##### Example:\n```yaml\ngnomish::wallpaper_source: 'puppet:///files/shared/wallpaper.png'\n```\n---\n## Class `gnomish::gnome`\n\n### Description\n\nThe `gnomish::gnome` class is used to configure application icons and settings that are valid for Mate desktops only. Additional\nyou can manage the system items menu file.\n\n### Parameters\n\n---\n#### applications (hash / optional)\nSpecify applications icons that will be passed to the gnomish::applications defined type. For a full description please read\non at the [application defined type](#defined-type-gnomishapplication).\n\n**Hint**: if you want to pass parameters from manifests, you will need to set `$gnomish::gnome::applications_hiera_merge` to *false*.\n\n- Default: ***{}***\n\n##### Example:\n```yaml\ngnomish::gnome::applications:\n  'mc':\n    ensure:           'file'\n    entry_categories: 'System;FileManager;'\n    entry_exec:       'mc'\n    entry_icon:       'mc'\n    entry_name:       'Midnight Commander'\n    entry_terminal:   false\n\ngnomish::gnome::applications:\n  'gnome-network-properties':\n    ensure: 'absent'\n```\n*The above will add a application icon for Midnight Commander in the file /usr/share/applications/mc.desktop and remove the icon\nfor gnome-network-properties.*\n\n---\n#### applications_hiera_merge (boolean / optional)\nIf set to *true* hiera_merge will be used to collect and concatenate applications settings from all applicable hiera levels. If set to\n*false* only the most specific hiera data will be used.\n\n**Hint**: if you want to pass parameters from manifests you will need to set it to *false*.\n\n- Default: ***true***\n\n---\n#### settings_xml (hash / optional)\nSpecify desktop settings that will be passed to the `gnomish::gnome::gconftool_2` defined type. For a full description please\nread on at the [gconftools_2](#defined-type-gnomishgnomegconftool_2) defined type.\n\n\n**Hint**: if you want to pass parameters from manifests you will need to set `$settings_xml_hiera_merge` to *false*.\n\n- Default: ***{}***\n\n##### Example for Mate setting:\n```yaml\ngnomish::gnome::settings_xml:\n  'set picture_options':\n    key:     '/desktop/gnome/background/picture_options'\n    value:   'zoom'\n```\n---\n#### settings_xml_hiera_merge (boolean / optional)\nIf set to *true* hiera_merge will be used to collect and concatenate desktop settings from all applicable hiera levels. If set to\n*false* only the most specific hiera data will be used.\n\n**Hint**: if you want to pass parameters from manifests you will need to set `$settings_xml_hiera_merge` to *false*.\n\n- Default: ***true***\n\n---\n#### system_items_modify (boolean / optional)\nIf set to *true* it will activate the modification of the system items menu file in /usr/share/gnome-main-menu/system-items.xbel.\nThe module delivers an example for SLE11 with a typical reduction useful for terminal servers.\n\n- Default: ***false***\n\n---\n#### system_items_path (string / optional)\nSpecify an absolute path to the system-items.xbel file which should get managed.\n\n**Hint**: if you want to pass parameters from manifests you will need to set `$settings_xml_hiera_merge` to *false*.\n\n- Default: ***'/usr/share/gnome-main-menu/system-items.xbel'***\n\n---\n#### system_items_source (string / optional)\nSpecify the source of the file to be copied to `$system_items_path`. Takes all values that are valid for the source attribute of a\n[file resource](https://docs.puppet.com/puppet/latest/reference/type.html#file-attribute-source).\n\n- Default: ***'puppet:///modules/gnomish/gnome/SLE11-system-items.xbel.erb'***\n\n---\n## Class `gnomish::mate`\n\n### Description\n\nThe `gnomish::mate` class is used to configure application icons and settings that are valid for Mate desktops only.\n\n\n### Parameters\n---\n#### applications (hash / optional)\nSpecify applications icons that will be passed to the gnomish::applications defined type. For a full description please read\non at the [application defined type](#defined-type-gnomishapplication).\n\n**Hint**: if you want to pass parameters from manifests, you will need to set `$gnomish::mate::applications_hiera_merge` to *false*.\n\n- Default: ***{}***\n\n##### Example:\n```yaml\ngnomish::mate::applications:\n  'mc':\n    ensure:           'file'\n    entry_categories: 'System;FileManager;'\n    entry_exec:       'mc'\n    entry_icon:       'mc'\n    entry_name:       'Midnight Commander'\n    entry_terminal:   false\n\ngnomish::mate::applications:\n  'mate-network-properties':\n    ensure: 'absent'\n```\n*The above will add a application icon for Midnight Commander in the file /usr/share/applications/mc.desktop and remove the icon\nfor mate-network-properties.*\n\n---\n#### applications_hiera_merge (boolean / optional)\nIf set to *true* hiera_merge will be used to collect and concatenate applications settings from all applicable hiera levels. If set to\n*false* only the most specific hiera data will be used.\n\n**Hint**: if you want to pass parameters from manifests you will need to set it to *false*.\n\n- Default: ***true***\n\n---\n#### settings_xml (hash / optional)\nSpecify desktop settings that will be passed to the `gnomish::mate::mateconftool_2` defined type. For a full description please\nread on at the [mateconftools_2](#defined-type-gnomishmatemateconftool_2) defined type.\n\n\n**Hint**: if you want to pass parameters from manifests you will need to set `$settings_xml_hiera_merge` to *false*.\n\n- Default: ***{}***\n\n##### Example for Mate setting:\n```yaml\ngnomish::mate::settings_xml:\n  'set picture_options':\n    key:     '/desktop/gnome/background/picture_options'\n    value:   'zoom'\n```\n---\n#### settings_xml_hiera_merge (boolean / optional)\nIf set to *true* hiera_merge will be used to collect and concatenate desktop settings from all applicable hiera levels. If set to\n*false* only the most specific hiera data will be used.\n\n**Hint**: if you want to pass parameters from manifests you will need to set `$settings_xml_hiera_merge` to *false*.\n\n- Default: ***true***\n\n---\n# Define Descriptions\n## Defined type `gnomish::application`\n\n### Description\n\nThe `gnomish::application` definition is used to manage application icons on both desktops, Gnome and Mate.\n\nThe minimum set of entries for application icons (Name, Icon, Exec, Categories, Type and Terminal) have to be set with the corresponding\nparameters. All others entries can be managed as an array of free text lines via the `$entry_lines` parameter. The module will ensure\nthat there are no duplicate entries and fail if found one.\n\nWhen applications get added or removed, it will call update-desktop-database. This will update the cache database of MIME types handled\nby desktop files.\n\nInstead of calling this define directly, it is recommended to specify `$gnomish::applications`, `$gnomish::gnome::applications` or\n`$gnomish::mate::applications` from hiera as a hash of group resources. create_resources will create resources out of your hash.\n\n##### Example for hashed application resources in hiera:\n```yaml\ngnomish::applications:\n  'mc':\n    ensure:           'file'\n    entry_categories: 'System;FileManager;'\n    entry_exec:       'mc'\n    entry_icon:       'mc'\n    entry_name:       'Midnight Commander'\n    entry_terminal:   false\n\ngnomish::gnome::applications:\n  'gnome-network-properties':\n    ensure: 'absent'\n\ngnomish::mate::applications:\n  'mate-network-properties':\n    ensure: 'absent'\n```\n*The above will add a application icon for Midnight Commander in the file /usr/share/applications/mc.desktop on both desktops. Only on\nGnome it will remove the icon for gnome-network-properties and only on Mate the equivalent called mate-network-properties.*\n\n### Parameters\n\n---\n#### ensure (string / optional)\nThis setting can be used to add or remove application icons. Valid values are *file* and *absent*. Use the default of *file* to\nadd/manage them or set it to *absent* to remove them. If set to *absent* `$entry_categories`, `$entry_exec` and `$entry_icon` become\nunused and optional.\n\n- Default: ***'file'***\n\n---\n#### path (string / mandatory)\nSpecify an absolute path to the desktop file containing the application icon. If not explicitly set, '/usr/share/applications/' plus\nthe resource title you have chosen while calling the defined type plus '.desktop' will be used.\n\n- Default: ***\"/usr/share/applications/${title}.desktop\"***\n\n---\n#### entry_categories (string / mandatory)\nSpecify the application icons Categories entry.\n\n**Hint**: becomes optional and unused when `$ensure` is set to *absent*.\n\n- Default: ***undef***\n\n---\n#### entry_exec (string / mandatory)\nSpecify the application icons Exec entry.\n\n**Hint**: becomes optional and unused when `$ensure` is set to *absent*.\n\n- Default: ***undef***\n\n---\n#### entry_icon (string / mandatory)\nSpecify the application icons Icon entry.\n\n**Hint**: becomes optional and unused when `$ensure` is set to *absent*.\n\n- Default: ***undef***\n\n---\n#### entry_lines (array / optional)\nYou can add additional and free text entries line by line with this array. If your input includes one of the other named entries\nthe defined type will fail to avoid double entries to appear.\n\n- Default: ***[]***\n\n---\n#### entry_name (string / optional)\nSpecify the application icons Name entry. If not explicitly set, the resource title you have chosen while calling the defined type\nwill be used.\n\n- Default: ***$title***\n\n---\n#### entry_terminal (boolean / optional)\nSpecify the application icons Terminal entry. Valid values are *false* and *true*.\n\n- Default: ***false***\n\n---\n#### entry_type (string / optional)\nSpecify the application icons Type entry.\n\n- Default: ***'Application'***\n\n---\n#### entry_mimetype (string or array / optional)\nSpecify the mime types supported by the application.\n\n- Default: ***undef***\n\n---\n## Defined type `gnomish::gnome::gconftool_2`\n## Defined type `gnomish::mate::mateconftool_2`\n\n### Description\nBoth defined types are used to configure Gnome or Mate system settings utilizing gconftool-2 or mateconftool-2. Up to now they\nhave the same functionality and share the parameters names.\n\nInstead of calling these defines directly, it is recommended to specify `$gnomish::settings_xml`, `$gnomish::gnome::settings_xml`\nor `$gnomish::mate::settings_xml` from hiera as a hash of group resources. create_resources will create resources out of your hash.\n\n##### Example for hashed settings_xml resources in hiera:\n```yaml\ngnomish::settings_xml:\n  '/desktop/gnome/background/picture_filename':\n    value:  'wallpaper.png'\n\ngnomish::gnome::settings_xml:\n  'set GTK theme':\n    key:    '/desktop/mate/interface/gtk_theme'\n    value:  'Theme'\n    config: 'mandatory'\n\ngnomish::mate::settings_xml:\n  'set GTK theme':\n    key:    '/desktop/gnome/interface/gtk_theme'\n    value:  'Theme'\n    config: 'mandatory'\n```\n*The above will set a wallpaper for both desktops and change the GTK theme with the respectively key for the different desktops.*\n\n### Parameters\n\n---\n#### value (string / mandatory)\nUsed to pass the content of the setting you want to change.\n\n- Default: ***undef***\n\n---\n#### config (string / optional)\nYou can specify which configuration source should get managed. For convenient usage, it allows to use *defaults* and *mandatory* as\nacronyms for /etc/gconf/gconf.xml.defaults and /etc/gconf/gconf.xml.mandatory. If you want to specify another configuration source,\nplease specify the complete absolute path for it.\n\n- Default: ***'defaults'***\n\n---\n#### key (string / optional)\nTo specify which key you want to manage. If not explicitly set, it will use the resource title you have chosen while calling the\ndefined type. See the [example](#example-for-hashed-settings_xml-resources-in-hiera) above for an example of both ways to pass the\nkey name.\n\n- Default: ***$title***\n\n---\n#### type (string / optional)\nThe default of *auto* will analyze and use the data type you have used when specifying `$value`. You can override this by setting type\nto one of the other valid values of *bool*, *int*, *float* or *string*.\n\n- Default: ***'auto'***\n\n---\n# Changelog\n\n* 1.3.1 Allow empty values for $value in gconftool-2 and mateconftool-2\n* 1.3.0 Support Puppet 8, remove support for Puppet v6 and older\n* 1.2.1 Support Puppet 6\n* 1.2.0 Support Puppet 5\n* 1.1.1 Support Puppet up to 4.9\n* 1.1.0 Feature requests:\n  * Add explicit support for MimeType(s) in application metadata\n  * Use $::path in exec resources\n  * Start supporting and testing on Ruby 2.3.1\n* 1.0.4 enhance type detection and value conversation\n  * Stringified booleans, integers, and floats in $value are now detected precisely if type is not manually set\n  * Stringified booleans, integers, and floats in $value are now correctly converted to strings\n  * Fix links in docs, add changelog section\n* 1.0.3 Enhance spelling in docs\n* 1.0.2 Add tags in metadata\n* 1.0.1 Fix supported Puppet versions in metadata\n* 1.0.0 Initial release\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fericsson%2Fpuppet-module-gnomish","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fericsson%2Fpuppet-module-gnomish","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fericsson%2Fpuppet-module-gnomish/lists"}