{"id":15022575,"url":"https://github.com/puppetlabs/puppetlabs-concat","last_synced_at":"2025-05-13T23:04:06.034Z","repository":{"id":897858,"uuid":"652130","full_name":"puppetlabs/puppetlabs-concat","owner":"puppetlabs","description":"File concatenation system for Puppet","archived":false,"fork":false,"pushed_at":"2025-04-23T12:21:54.000Z","size":1232,"stargazers_count":171,"open_issues_count":8,"forks_count":303,"subscribers_count":179,"default_branch":"main","last_synced_at":"2025-04-30T05:54:47.178Z","etag":null,"topics":["hacktoberfest","module","supported"],"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/puppetlabs.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":"CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2010-05-06T21:49:50.000Z","updated_at":"2025-04-23T12:21:57.000Z","dependencies_parsed_at":"2024-01-18T07:40:03.802Z","dependency_job_id":"ad1da6d1-85cb-4604-907f-abad3d02f8a2","html_url":"https://github.com/puppetlabs/puppetlabs-concat","commit_stats":{"total_commits":757,"total_committers":168,"mean_commits":4.505952380952381,"dds":0.9365918097754293,"last_synced_commit":"d4374bd621760ad9325817b3a8e81b319f1a1001"},"previous_names":[],"tags_count":56,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/puppetlabs%2Fpuppetlabs-concat","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/puppetlabs%2Fpuppetlabs-concat/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/puppetlabs%2Fpuppetlabs-concat/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/puppetlabs%2Fpuppetlabs-concat/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/puppetlabs","download_url":"https://codeload.github.com/puppetlabs/puppetlabs-concat/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254040436,"owners_count":22004539,"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":["hacktoberfest","module","supported"],"created_at":"2024-09-24T19:58:08.171Z","updated_at":"2025-05-13T23:04:06.014Z","avatar_url":"https://github.com/puppetlabs.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# concat\n\n#### Table of Contents\n\n1. [Overview](#overview)\n2. [Module Description - What the module does and why it is useful](#module-description)\n    * [Beginning with concat](#beginning-with-concat)\n4. [Usage - Configuration options and additional functionality](#usage)\n5. [Reference - An under-the-hood peek at what the module is doing and how](#reference)\n    * [Removed functionality](#removed-functionality)\n6. [Limitations - OS compatibility, etc.](#limitations)\n7. [License](#license)\n8. [Development - Guide for contributing to the module](#development)\n\n\u003ca id=\"overview\"\u003e\u003c/a\u003e\n## Overview\n\nThe concat module lets you construct files from multiple ordered fragments of text.\n\n\u003ca id=\"module-description\"\u003e\u003c/a\u003e\n## Module Description\n\nThe concat module lets you gather `concat::fragment` resources from your other modules and order them into a coherent file through a single `concat` resource.\n\n\u003ca id=\"beginning-with-concat\"\u003e\u003c/a\u003e\n### Beginning with concat\n\nTo start using concat you need to create:\n\n* A concat{} resource for the final file.\n* One or more concat::fragment{}s.\n\nA minimal example might be:\n\n~~~\nconcat { '/tmp/file':\n  ensure =\u003e present,\n}\n\nconcat::fragment { 'tmpfile':\n  target  =\u003e '/tmp/file',\n  content =\u003e 'test contents',\n  order   =\u003e '01'\n}\n~~~\n\n\u003ca id=\"usage\"\u003e\u003c/a\u003e\n## Usage\n\n### Maintain a list of the major modules on a node\n\nTo maintain an motd file that lists the modules on one of your nodes, first create a class to frame up the file:\n\n~~~\nclass motd {\n  $motd = '/etc/motd'\n\n  concat { $motd:\n    owner =\u003e 'root',\n    group =\u003e 'root',\n    mode  =\u003e '0644'\n  }\n\n  concat::fragment { 'motd_header':\n    target  =\u003e $motd,\n    content =\u003e \"\\nPuppet modules on this server:\\n\\n\",\n    order   =\u003e '01'\n  }\n\n  # let local users add to the motd by creating a file called\n  # /etc/motd.local\n  concat::fragment { 'motd_local':\n    target =\u003e $motd,\n    source =\u003e '/etc/motd.local',\n    order  =\u003e '15'\n  }\n}\n\n# let other modules register themselves in the motd\ndefine motd::register (\n  $content = \"\",\n  $order   = '10',\n) {\n  if $content == \"\" {\n    $body = $name\n  } else {\n    $body = $content\n  }\n\n  concat::fragment { \"motd_fragment_$name\":\n    target  =\u003e '/etc/motd',\n    order   =\u003e $order,\n    content =\u003e \"    -- $body\\n\"\n  }\n}\n~~~\n\nThen, in the declarations for each module on the node, add `motd::register{ 'Apache': }` to register the module in the motd.\n\n~~~\nclass apache {\n  include apache::install, apache::config, apache::service\n\n  motd::register { 'Apache': }\n}\n~~~\n\nThese two steps populate the /etc/motd file with a list of the installed and registered modules, which stays updated even if you just remove the registered modules' `include` lines. System administrators can append text to the list by writing to /etc/motd.local.\n\nWhen you're finished, the motd file will look something like this:\n\n~~~\n  Puppet modules on this server:\n\n    -- Apache\n    -- MySQL\n\n  \u003ccontents of /etc/motd.local\u003e\n~~~\n\n\u003ca id=\"reference\"\u003e\u003c/a\u003e\n## Reference\n\nSee [REFERENCE.md](https://github.com/puppetlabs/puppetlabs-concat/blob/main/REFERENCE.md)\n\n\u003ca id=\"limitations\"\u003e\u003c/a\u003e\n## Limitations\n\nThis module has been tested on [all PE-supported platforms](https://forge.puppetlabs.com/supported#compat-matrix), and no issues have been identified.\n\nFor an extensive list of supported operating systems, see [metadata.json](https://github.com/puppetlabs/puppetlabs-concat/blob/main/metadata.json)\n\n## License\n\nThis codebase is licensed under the Apache2.0 licensing, however due to the nature of the codebase the open source dependencies may also use a combination of [AGPL](https://opensource.org/license/agpl-v3/), [BSD-2](https://opensource.org/license/bsd-2-clause/), [BSD-3](https://opensource.org/license/bsd-3-clause/), [GPL2.0](https://opensource.org/license/gpl-2-0/), [LGPL](https://opensource.org/license/lgpl-3-0/), [MIT](https://opensource.org/license/mit/) and [MPL](https://opensource.org/license/mpl-2-0/) Licensing.\n\n## Development\n\nAcceptance tests for this module leverage [puppet_litmus](https://github.com/puppetlabs/puppet_litmus).\nTo run the acceptance tests follow the instructions [here](https://github.com/puppetlabs/puppet_litmus/wiki/Tutorial:-use-Litmus-to-execute-acceptance-tests-with-a-sample-module-(MoTD)#install-the-necessary-gems-for-the-module).\nYou can also find a tutorial and walkthrough of using Litmus and the PDK on [YouTube](https://www.youtube.com/watch?v=FYfR7ZEGHoE).\n\nIf you run into an issue with this module, or if you would like to request a feature, please [file a ticket](https://tickets.puppetlabs.com/browse/MODULES/).\nEvery Tuesday the Content and Tooling Team has [office hours](https://puppet.com/community/office-hours) in the [Puppet Community Slack](http://slack.puppet.com/), where you can ask questions about this and any other supported modules.\nThis session usually runs at, approximately, 15:00 (BST), for about an hour.\n\nIf you have problems getting this module up and running, please [contact Support](http://puppetlabs.com/services/customer-support).\n\nIf you submit a change to this module, be sure to regenerate the reference documentation as follows:\n\n```bash\npuppet strings generate --format markdown --out REFERENCE.md\n```\n\n### Contributors\n\nRichard Pijnenburg ([@Richardp82](http://twitter.com/richardp82))\n\nJoshua Hoblitt ([@jhoblitt](http://twitter.com/jhoblitt))\n\n[More contributors](https://github.com/puppetlabs/puppetlabs-concat/graphs/contributors).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpuppetlabs%2Fpuppetlabs-concat","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpuppetlabs%2Fpuppetlabs-concat","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpuppetlabs%2Fpuppetlabs-concat/lists"}