{"id":14994549,"url":"https://github.com/voxpupuli/puppet-augeasproviders_shellvar","last_synced_at":"2025-04-10T01:23:58.454Z","repository":{"id":16707873,"uuid":"19464686","full_name":"voxpupuli/puppet-augeasproviders_shellvar","owner":"voxpupuli","description":"Augeas-based shellvar type and provider for Puppet","archived":false,"fork":false,"pushed_at":"2024-09-17T00:29:52.000Z","size":738,"stargazers_count":4,"open_issues_count":8,"forks_count":23,"subscribers_count":42,"default_branch":"master","last_synced_at":"2024-10-29T14:22:32.877Z","etag":null,"topics":["augeas","augeasproviders","bash","centos-puppet-module","configuration","configuration-files","configuration-management","debian-puppet-module","hacktoberfest","linux-puppet-module","oraclelinux-puppet-module","puppet","puppet-module","puppet-resources","redhat-puppet-module","shellvar","ubuntu-puppet-module"],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/voxpupuli.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":".github/CONTRIBUTING.md","funding":null,"license":"LICENSE","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,"publiccode":null,"codemeta":null},"funding":{"open_collective":"vox-pupuli","github":"voxpupuli"}},"created_at":"2014-05-05T17:34:18.000Z","updated_at":"2024-09-17T00:29:54.000Z","dependencies_parsed_at":"2024-04-15T06:31:51.949Z","dependency_job_id":"d42d9873-ab8e-46b1-acff-14516a6b00f9","html_url":"https://github.com/voxpupuli/puppet-augeasproviders_shellvar","commit_stats":{"total_commits":141,"total_committers":21,"mean_commits":6.714285714285714,"dds":"0.42553191489361697","last_synced_commit":"eebeb9260d2b76341590266ebbb73d5df64c37fd"},"previous_names":["hercules-team/augeasproviders_shellvar"],"tags_count":41,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/voxpupuli%2Fpuppet-augeasproviders_shellvar","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/voxpupuli%2Fpuppet-augeasproviders_shellvar/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/voxpupuli%2Fpuppet-augeasproviders_shellvar/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/voxpupuli%2Fpuppet-augeasproviders_shellvar/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/voxpupuli","download_url":"https://codeload.github.com/voxpupuli/puppet-augeasproviders_shellvar/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248138789,"owners_count":21053953,"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":["augeas","augeasproviders","bash","centos-puppet-module","configuration","configuration-files","configuration-management","debian-puppet-module","hacktoberfest","linux-puppet-module","oraclelinux-puppet-module","puppet","puppet-module","puppet-resources","redhat-puppet-module","shellvar","ubuntu-puppet-module"],"created_at":"2024-09-24T16:03:48.873Z","updated_at":"2025-04-10T01:23:58.425Z","avatar_url":"https://github.com/voxpupuli.png","language":"Ruby","funding_links":["https://opencollective.com/vox-pupuli","https://github.com/sponsors/voxpupuli"],"categories":[],"sub_categories":[],"readme":"\n[![Build Status](https://github.com/voxpupuli/puppet-augeasproviders_shellvar/workflows/CI/badge.svg)](https://github.com/voxpupuli/puppet-augeasproviders_shellvar/actions?query=workflow%3ACI)\n[![Release](https://github.com/voxpupuli/puppet-augeasproviders_shellvar/actions/workflows/release.yml/badge.svg)](https://github.com/voxpupuli/puppet-augeasproviders_shellvar/actions/workflows/release.yml)\n[![Puppet Forge](https://img.shields.io/puppetforge/v/puppet/augeasproviders_shellvar.svg)](https://forge.puppetlabs.com/puppet/augeasproviders_shellvar)\n[![Puppet Forge - downloads](https://img.shields.io/puppetforge/dt/puppet/augeasproviders_shellvar.svg)](https://forge.puppetlabs.com/puppet/augeasproviders_shellvar)\n[![Puppet Forge - endorsement](https://img.shields.io/puppetforge/e/puppet/augeasproviders_shellvar.svg)](https://forge.puppetlabs.com/puppet/augeasproviders_shellvar)\n[![Puppet Forge - scores](https://img.shields.io/puppetforge/f/puppet/augeasproviders_shellvar.svg)](https://forge.puppetlabs.com/puppet/augeasproviders_shellvar)\n[![puppetmodule.info docs](http://www.puppetmodule.info/images/badge.png)](http://www.puppetmodule.info/m/puppet-augeasproviders_shellvar)\n[![Coverage Status](https://img.shields.io/coveralls/voxpupuli/puppet-augeasproviders_shellvar.svg)](https://coveralls.io/r/voxpupuli/puppet-augeasproviders_shellvar)\n[![Apache-2 License](https://img.shields.io/github/license/voxpupuli/puppet-augeasproviders_shellvar.svg)](LICENSE)\n\n# shellvar: type/provider for shell files for Puppet\n\nThis module provides a new type/provider for Puppet to read and modify shell\nconfig files using the Augeas configuration library.\n\nThe advantage of using Augeas over the default Puppet `parsedfile`\nimplementations is that Augeas will go to great lengths to preserve file\nformatting and comments, while also failing safely when needed.\n\nThis provider will hide *all* of the Augeas commands etc., you don't need to\nknow anything about Augeas to make use of it.\n\n## Requirements\n\nEnsure both Augeas and ruby-augeas 0.3.0+ bindings are installed and working as\nnormal.\n\nSee [Puppet/Augeas pre-requisites](http://docs.puppetlabs.com/guides/augeas.html#pre-requisites).\n\n## Installing\n\nThe module can be installed easily ([documentation](http://docs.puppetlabs.com/puppet/latest/reference/modules_installing.html)):\n\n```\npuppet module install puppet/augeasproviders_shellvar\n```\n\n## Documentation and examples\n\nType documentation can be generated with `puppet doc -r type` or viewed on the\n[Puppet Forge page](http://forge.puppetlabs.com/puppet/augeasproviders_shellvar).\n\n### manage simple entry\n\n    shellvar { \"HOSTNAME\":\n      ensure =\u003e present,\n      target =\u003e \"/etc/sysconfig/network\",\n      value  =\u003e \"host.example.com\",\n    }\n\n    shellvar { \"disable rsyncd\":\n      ensure   =\u003e present,\n      target   =\u003e \"/etc/default/rsync\",\n      variable =\u003e \"RSYNC_ENABLE\",\n      value    =\u003e \"false\",\n    }\n\n    shellvar { \"ntpd options\":\n      ensure   =\u003e present,\n      target   =\u003e \"/etc/sysconfig/ntpd\",\n      variable =\u003e \"OPTIONS\",\n      value    =\u003e \"-g -x -c /etc/myntp.conf\",\n    }\n\n### manage entry with comment\n\n    shellvar { \"HOSTNAME\":\n      ensure  =\u003e present,\n      target  =\u003e \"/etc/sysconfig/network\",\n      comment =\u003e \"My server's hostname\",\n      value   =\u003e \"host.example.com\",\n    }\n\n### export values\n\n    shellvar { \"HOSTNAME\":\n      ensure  =\u003e exported,\n      target  =\u003e \"/etc/sysconfig/network\",\n      value   =\u003e \"host.example.com\",\n    }\n\n### unset values\n\n    shellvar { \"HOSTNAME\":\n      ensure  =\u003e unset,\n      target  =\u003e \"/etc/sysconfig/network\",\n    }\n\n### force quoting style\n\nValues needing quotes will automatically get them, but they can also be\nexplicitly enabled.  Unfortunately the provider doesn't help with quoting the\nvalues themselves.\n\n    shellvar { \"RSYNC_IONICE\":\n      ensure   =\u003e present,\n      target   =\u003e \"/etc/default/rsync\",\n      value    =\u003e \"-c3\",\n      quoted   =\u003e \"single\",\n    }\n\n### delete entry\n\n    shellvar { \"RSYNC_IONICE\":\n      ensure =\u003e absent,\n      target =\u003e \"/etc/default/rsync\",\n    }\n\n### remove comment from entry\n\n    shellvar { \"HOSTNAME\":\n      ensure  =\u003e present,\n      target  =\u003e \"/etc/sysconfig/network\",\n      comment =\u003e \"\",\n    }\n\n### replace commented value with entry\n\n    shellvar { \"HOSTNAME\":\n      ensure    =\u003e present,\n      target    =\u003e \"/etc/sysconfig/network\",\n      value     =\u003e \"host.example.com\",\n      uncomment =\u003e true,\n    }\n\n### uncomment a value\n\n    shellvar { \"HOSTNAME\":\n      ensure    =\u003e present,\n      target    =\u003e \"/etc/sysconfig/network\",\n      uncomment =\u003e true,\n    }\n\n### array values\n\nYou can pass array values to the type.\n\nThere are two ways of rendering array values, and the behavior is set using\nthe `array_type` parameter. `array_type` takes three possible values:\n\n* `auto` (default): detects the type of the existing variable, defaults to `string`;\n* `string`: renders the array as a string, with a space as element separator;\n* `array`: renders the array as a shell array.\n\nFor example:\n\n    shellvar { \"PORTS\":\n      ensure     =\u003e present,\n      target     =\u003e \"/etc/default/puppetmaster\",\n      value      =\u003e [\"18140\", \"18141\", \"18142\"],\n      array_type =\u003e \"auto\",\n    }\n\nwill create `PORTS=\"18140 18141 18142\"` by default, and will change `PORTS=(123)` to `PORTS=(\"18140\" \"18141\" \"18142\")`.\n\n    shellvar { \"PORTS\":\n      ensure     =\u003e present,\n      target     =\u003e \"/etc/default/puppetmaster\",\n      value      =\u003e [\"18140\", \"18141\", \"18142\"],\n      array_type =\u003e \"string\",\n    }\n\nwill create `PORTS=\"18140 18141 18142\"` by default, and will change `PORTS=(123)` to `PORTS=\"18140 18141 18142\"`.\n\n    shellvar { \"PORTS\":\n      ensure     =\u003e present,\n      target     =\u003e \"/etc/default/puppetmaster\",\n      value      =\u003e [\"18140\", \"18141\", \"18142\"],\n      array_type =\u003e \"array\",\n    }\n\nwill create `PORTS=(\"18140\" \"18141\" \"18142\")` by default, and will change `PORTS=123` to `PORTS=(18140 18141 18142)`.\n\nQuoting is honored for arrays:\n\n* When using the string behavior, quoting is global to the string;\n* When using the array behavior, each value in the array is quoted as requested.\n\n### appending to arrays\n\n    shellvar { \"GRUB_CMDLINE_LINUX\":\n      ensure       =\u003e present,\n      target       =\u003e \"/etc/default/grub\",\n      value        =\u003e \"cgroup_enable=memory\",\n      array_append =\u003e true,\n    }\n\nwill change `GRUB_CMDLINE_LINUX=\"quiet splash\"` to `GRUB_CMDLINE_LINUX=\"quiet splash cgroup_enable=memory\"`.\n\n    shellvar { \"GRUB_CMDLINE_LINUX\":\n      ensure       =\u003e present,\n      target       =\u003e \"/etc/default/grub\",\n      value        =\u003e [\"quiet\", \"cgroup_enable=memory\"],\n      array_append =\u003e true,\n    }\n\nwill also change `GRUB_CMDLINE_LINUX=\"quiet splash\"` to `GRUB_CMDLINE_LINUX=\"quiet splash cgroup_enable=memory\"`.\n\n### removing from arrays\n\n    shellvar { \"GRUB_CMDLINE_LINUX\":\n      ensure       =\u003e absent,\n      target       =\u003e \"/etc/default/grub\",\n      value        =\u003e \"cgroup_enable=memory\",\n      array_append =\u003e true,\n    }\n\nwill change `GRUB_CMDLINE_LINUX=\"quiet splash cgroup_enable=memory\"` to `GRUB_CMDLINE_LINUX=\"quiet splash\"`.\n\n    shellvar { \"GRUB_CMDLINE_LINUX\":\n      ensure       =\u003e absent,\n      target       =\u003e \"/etc/default/grub\",\n      value        =\u003e [\"quiet\", \"cgroup_enable=memory\"],\n      array_append =\u003e true,\n    }\n\nwill also change `GRUB_CMDLINE_LINUX=\"splash cgroup_enable=memory\"` to `GRUB_CMDLINE_LINUX=\"splash\"`.\n\n## Issues\n\nPlease file any issues or suggestions [on GitHub](https://github.com/voxpupuli/puppet-augeasproviders_shellvar/issues).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvoxpupuli%2Fpuppet-augeasproviders_shellvar","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvoxpupuli%2Fpuppet-augeasproviders_shellvar","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvoxpupuli%2Fpuppet-augeasproviders_shellvar/lists"}