{"id":13778003,"url":"https://github.com/voxpupuli/puppet-ghostbuster","last_synced_at":"2025-11-21T15:03:52.139Z","repository":{"id":30761035,"uuid":"34317670","full_name":"voxpupuli/puppet-ghostbuster","owner":"voxpupuli","description":"👻 Dead code detector for Puppet","archived":false,"fork":false,"pushed_at":"2025-03-14T20:38:31.000Z","size":184,"stargazers_count":95,"open_issues_count":7,"forks_count":28,"subscribers_count":12,"default_branch":"master","last_synced_at":"2025-05-11T22:28:48.637Z","etag":null,"topics":["cleanup","code-quality","hacktoberfest","puppet","puppet-lint","puppetdb"],"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":null,"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":"2015-04-21T09:33:07.000Z","updated_at":"2024-12-12T15:12:31.000Z","dependencies_parsed_at":"2022-08-20T15:20:51.696Z","dependency_job_id":"56dcc8e6-3d06-4841-b8f5-4a33788cde61","html_url":"https://github.com/voxpupuli/puppet-ghostbuster","commit_stats":{"total_commits":149,"total_committers":14,"mean_commits":"10.642857142857142","dds":0.563758389261745,"last_synced_commit":"92c7d72cf155094b9e8ee4f5bd51dc8665468f5d"},"previous_names":["camptocamp/puppet-ghostbuster"],"tags_count":31,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/voxpupuli%2Fpuppet-ghostbuster","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/voxpupuli%2Fpuppet-ghostbuster/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/voxpupuli%2Fpuppet-ghostbuster/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/voxpupuli%2Fpuppet-ghostbuster/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/voxpupuli","download_url":"https://codeload.github.com/voxpupuli/puppet-ghostbuster/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254442854,"owners_count":22071877,"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":["cleanup","code-quality","hacktoberfest","puppet","puppet-lint","puppetdb"],"created_at":"2024-08-03T18:00:50.407Z","updated_at":"2025-11-21T15:03:52.085Z","avatar_url":"https://github.com/voxpupuli.png","language":"Ruby","funding_links":["https://opencollective.com/vox-pupuli","https://github.com/sponsors/voxpupuli"],"categories":["Puppet Tools","Modules"],"sub_categories":["Modules Development"],"readme":"puppet-ghostbuster\n==================\n\n[![License](https://img.shields.io/github/license/voxpupuli/puppet-ghostbuster.svg)](https://github.com/voxpupuli/puppet-ghostbuster/blob/master/LICENSE)\n[![Test](https://github.com/voxpupuli/puppet-ghostbuster/actions/workflows/test.yml/badge.svg)](https://github.com/voxpupuli/puppet-ghostbuster/actions/workflows/test.yml)\n[![Release](https://github.com/voxpupuli/puppet-ghostbuster/actions/workflows/release.yml/badge.svg)](https://github.com/voxpupuli/puppet-ghostbuster/actions/workflows/release.yml)\n[![RubyGem Version](https://img.shields.io/gem/v/puppet-ghostbuster.svg)](https://rubygems.org/gems/puppet-ghostbuster)\n[![RubyGem Downloads](https://img.shields.io/gem/dt/puppet-ghostbuster.svg)](https://rubygems.org/gems/puppet-ghostbuster)\n[![Donated by Camptocamp](https://img.shields.io/badge/donated%20by-camptocamp-fb7047.svg)](#transfer-notice)\n\nWhen you have dead puppet code hanging around ...\n*Who you gonna call ?*\n\n\nThis gems helps puppet users to find dead code by displaying unused classes, defined resources, template and files.\n\nThis gems only support PuppetDB APi v4 (PuppetDB 3+)\n\nUsage\n-----\n\n```shell\n$ find . -type f -exec puppet-lint --only-checks ghostbuster_classes,ghostbuster_defines,ghostbuster_facts,ghostbuster_files,ghostbuster_functions,ghostbuster_hiera_files,ghostbuster_templates,ghostbuster_types {} \\+\n```\n\n**the command has to be executed in your environment root, e.g. /etc/puppetlabs/code/environments/production/**\n\nEnvironment variables\n---------------------\n\n### HIERA_YAML_PATH\n\nThe location of the `hiera.yaml` file. Defaults to `./hiera.yaml` or `/etc/puppetlabs/puppet/hiera.yaml` whichever is found first.\n\n### PUPPETDB_URL\n\nThe url or the PuppetDB. Defaults to `http://puppetdb:8080`\n\n### PUPPETDB_CACERT_FILE\n\nYour site’s CA certificate\n\n### PUPPETDB_CERT_FILE\n\nAn SSL certificate signed by your site’s Puppet CA\n\n### PUPPETDB_KEY_FILE\n\nThe private key for that certificate\n\n### PE_TOKEN\n\nIf set, PE token authentication will be used instead of certificate authentication.\nValue may be a token _or_ path to a file containing a token.\n\nPlugins\n-------\n\n### ghostbuster_classes\n\nFind unused classes in PuppetDB.\n\n### ghostbuster_defines\n\nFind unused defined types in PuppetDB.\n\n### ghostbuster_facts\n\nFind unused facts in Puppet manifests and templates.\n\n### ghostbuster_files\n\nFind unused files in PuppetDB or in Puppet manifests.\n\n### ghostbuster_functions\n\nFind unused functions in Puppet manifests or templates.\n\n### ghostbuster_hiera_files\n\nFind unused hiera files in PuppetDB.\n\n### ghostbuster_templates\n\nFind unused templates in Puppet manifests.\n\n### ghostbuster_types\n\nFind unused types in Puppet manifests.\n\nExample output\n--------------\n\nTODO\n```\n$ find . -type f -exec puppet-lint --only-checks ghostbuster_classes,ghostbuster_defines,ghostbuster_files,ghostbuster_hiera_files,ghostbuster_templates {} \\+\n./modules/foo/manifests/install.pp - WARNING: Class Foo::Install seems unused on line 1\n./modules/foo/manifests/service.pp - WARNING: Class Foo::Service seems unused on line 1\n./modules/foo/manifests/init.pp - WARNING: Class Foo seems unused on line 1\n./modules/bar/manifests/baz.pp - WARNING: Define Bar::Baz seems unused on line 1\n./modules/modulename/templates/foo.erb - WARNING: Template modulename/foo.erb seems unused on line 1\n./modules/modulename/templates/bar.erb - WARNING: Template modulename/bar.erb seems unused on line 1\n./modules/modulename/templates/baz.erb - WARNING: Template modulename/baz.erb seems unused on line 1\n./modules/foo/files/bar.txt - WARNING: File foo/bar.txt seems unused on line 1\n./modules/foo/files/baz.txt - WARNING: File foo/baz.txt seems unused on line 1\n```\n\n## Transfer Notice\n\nThis plugin was originally authored by [Camptocamp](http://www.camptocamp.com).\nThe maintainer preferred that Puppet Community take ownership of the module for future improvement and maintenance.\nExisting pull requests and issues were transferred over, please fork and continue to contribute here instead of Camptocamp.\n\nPreviously: https://github.com/camptocamp/puppet-ghostbuster\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvoxpupuli%2Fpuppet-ghostbuster","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvoxpupuli%2Fpuppet-ghostbuster","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvoxpupuli%2Fpuppet-ghostbuster/lists"}