{"id":20476667,"url":"https://github.com/rabbitmq/chef-cookbook","last_synced_at":"2025-12-17T08:49:03.937Z","repository":{"id":2725973,"uuid":"3720904","full_name":"rabbitmq/chef-cookbook","owner":"rabbitmq","description":"Development repository for Chef cookbook RabbitMQ","archived":false,"fork":false,"pushed_at":"2025-09-25T18:58:42.000Z","size":1915,"stargazers_count":212,"open_issues_count":13,"forks_count":423,"subscribers_count":49,"default_branch":"v5.x","last_synced_at":"2025-09-25T20:58:12.775Z","etag":null,"topics":["chef","chef-cookbook","cookbooks","rabbitmq"],"latest_commit_sha":null,"homepage":"https://supermarket.chef.io/cookbooks/rabbitmq","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/rabbitmq.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":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2012-03-14T18:38:08.000Z","updated_at":"2025-09-25T18:58:42.000Z","dependencies_parsed_at":"2024-05-16T22:27:43.942Z","dependency_job_id":"6f5d8ef2-ad7d-422f-8d28-1f6f60a0f470","html_url":"https://github.com/rabbitmq/chef-cookbook","commit_stats":{"total_commits":1170,"total_committers":165,"mean_commits":7.090909090909091,"dds":0.7264957264957265,"last_synced_commit":"d9215a20d660ec8495cf3dbe1348aab013092954"},"previous_names":[],"tags_count":82,"template":false,"template_full_name":null,"purl":"pkg:github/rabbitmq/chef-cookbook","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rabbitmq%2Fchef-cookbook","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rabbitmq%2Fchef-cookbook/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rabbitmq%2Fchef-cookbook/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rabbitmq%2Fchef-cookbook/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rabbitmq","download_url":"https://codeload.github.com/rabbitmq/chef-cookbook/tar.gz/refs/heads/v5.x","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rabbitmq%2Fchef-cookbook/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":27780606,"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","status":"online","status_checked_at":"2025-12-17T02:00:08.291Z","response_time":55,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["chef","chef-cookbook","cookbooks","rabbitmq"],"created_at":"2024-11-15T15:22:12.782Z","updated_at":"2025-12-17T08:49:03.921Z","avatar_url":"https://github.com/rabbitmq.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# RabbitMQ Chef Cookbook\n\n[![Build Status](https://travis-ci.org/rabbitmq/chef-cookbook.svg?branch=master)](https://travis-ci.org/rabbitmq/chef-cookbook)\n[![Cookbook Version](https://img.shields.io/cookbook/v/rabbitmq.svg)](https://supermarket.chef.io/cookbooks/rabbitmq)\n\nThis is a cookbook for managing RabbitMQ with Chef.\n\n## Supported Chef Versions\n\nThis cookbook targets Chef 14.0 and later.\n\n\n## Supported RabbitMQ Versions\n\n`5.x` release series targets [RabbitMQ `3.8.x` releases](https://www.rabbitmq.com/versions.html).\n\nFor any series used, a [supported Erlang version](http://www.rabbitmq.com/which-erlang.html) must be provisioned.\n\n\n## Supported Distributions\n\nThe cookbook generally targets [the same Debian-based distribution versions](https://www.rabbitmq.com/docs/install-debian) that RabbitMQ core team supports:\n\n * Recent and [community supported versions of Ubuntu](https://ubuntu.com/about/release-cycle), e.g. 22.04 and later\n * Debian 11 (Bullseye) and 12 (\n * RHEL 8+\n * CentOS Stream 9\n * Fedora 35 or later\n * Amazon Linux 2023\n * Rocky Linux 9\n * Alma Linux 9\n\n### Newer Versions\n\nNewer Debian, Ubuntu and RHEL/Fedora/CentOS Stream versions should work.\n\n\n## Dependencies\n\nThis cookbook depends on the [Erlang cookbook](https://supermarket.chef.io/cookbooks/erlang)\nand assumes that the user can configure it to provision a [supported Erlang/OTP version](https://www.rabbitmq.com/which-erlang.html).\n\nTwo more recipes are provided by this cookbook:`rabbitmq::erlang_package` and `rabbitmq::esl_erlang_package`.\nThe latter is an alias to the `erlang::esl` recipe in the Erlang\ncookbook.\n\nThe former uses [Debian Erlang packages](https://github.com/rabbitmq/erlang-debian-package/) and [zero dependency Erlang RPM package](https://github.com/rabbitmq/erlang-rpm) produced and published by Team RabbitMQ.\nThose packages provide the latest patch releases of Erlang/OTP.\n\nBoth options are covered below.\n\n\n\n## Provisioning RabbitMQ 3.9.x and 3.8.x (both [out of support](https://www.rabbitmq.com/release-information))\n\n### Ensure Your Cookbook Version is Compatible\n\nTo provision RabbitMQ 3.9.x or 3.8.x, you must use version `5.8.5` of this cookbook or later.\n\n### Provision Erlang/OTP 23.2 or Later\n\nBefore provisioning a 3.9.x or 3.8.x release, please learn about\nthe [minimum required Erlang/OTP version](https://www.rabbitmq.com/which-erlang.html)\nand Erlang/OTP version recommendations.\n\nMost distributions provide older versions, so Erlang must be provisioned either\nusing [RabbitMQ's zero dependency Erlang RPM](https://github.com/rabbitmq/erlang-rpm),\n[Debian Erlang packages](https://github.com/rabbitmq/erlang-debian-package/),\nor from [Erlang Solutions](https://packages.erlang-solutions.com/erlang/)\n\n#### Installing Erlang Using Packages by Team RabbitMQ\n\n`rabbitmq::erlang_package` is a recipe that provisions latest Erlang packages from team RabbitMQ.\nThe packages support\n\n * Debian 10 and 11\n * Ubuntu 18.04 through 20.04\n * RHEL 8\n * CentOS Stream 8\n * Fedora 32 or later\n * Amazon Linux 2022\n * Scientific Linux 7\n\nThe packages are **cannot be installed alongside with other Erlang packages**, for example, those\nfrom standard Debian repositories or Erlang Solutions.\n\nTo make sure that the Erlang cookbook is not used by `rabbitmq::default`, `rabbitmq::cluster`,\nand other recipes, set `node['rabbitmq']['erlang']['enabled']` to `true`:\n\n``` ruby\nnode['rabbitmq']['erlang']['enabled'] = true\n```\n\nBy default `rabbitmq::erlang_package` will install the latest Erlang version available.\nTo override package version, use `node['rabbitmq']['erlang']['version']`:\n\n``` ruby\n# Debian\nnode['rabbitmq']['erlang']['version'] = '1:24.3.3-1'\n\n# RPM\nnode['rabbitmq']['erlang']['version'] = '24.3.3'\n```\n\nOn Ubuntu and Debian the distribution will be picked from node attributes.\n\nMost of the time there is no need to override other attributes. Below is a list of defaults\nused on Ubuntu and Debian:\n\n``` ruby\n# RabbitMQ Erlang packages\ndeb_distro = value_for_platform(\n  'debian' =\u003e {\n    'default' =\u003e 'debian'\n  },\n  'ubuntu' =\u003e {\n    'default' =\u003e 'ubuntu'\n  }\n)\n\ndefault['rabbitmq']['erlang']['apt']['uri'] = \"https://dl.cloudsmith.io/public/rabbitmq/rabbitmq-erlang/deb/#{deb_distro}\"\ndefault['rabbitmq']['erlang']['apt']['lsb_codename'] = node['lsb']['codename']\ndefault['rabbitmq']['erlang']['apt']['components'] = [\"main\"]\ndefault['rabbitmq']['erlang']['apt']['key'] = 'https://dl.cloudsmith.io/public/rabbitmq/rabbitmq-erlang/gpg.E495BB49CC4BBE5B.key'\n\ndefault['rabbitmq']['erlang']['apt']['install_options'] = %w(--fix-missing)\n```\n\nOn CentOS Stream 8, base Yum repository URL will be picked based on distribution versions.\nOn Fedora, a suitable CentOS package will be used. Erlang package version is set the same way\nas for Debian (see above).\n\nBelow are the defaults used by the Yum repository (assuming RHEL or CentOS Stream 8):\n\n``` ruby\n# CentOS 8, RHEL 8, Fedora\ndefault['rabbitmq']['erlang']['yum']['baseurl'] = 'https://dl.cloudsmith.io/public/rabbitmq/rabbitmq-erlang/rpm/el/8/$basearch'\ndefault['rabbitmq']['erlang']['yum']['gpgkey'] = 'https://dl.cloudsmith.io/public/rabbitmq/rabbitmq-erlang/gpg.E495BB49CC4BBE5B.key'\ndefault['rabbitmq']['erlang']['yum']['gpgcheck'] = true\ndefault['rabbitmq']['erlang']['yum']['repo_gpgcheck'] = false\n```\n\n\n#### Installing Erlang with the Erlang Cookbook\n\nThe Erlang cookbook will provision [packages from Erlang Solutions](https://www.erlang-solutions.com/resources/download.html)\nif `node['erlang']['install_method']` is set to `esl`.\nNote that Erlang Solutions repositories can be behind the latest Erlang/OTP patch releases.\n\n``` ruby\n# will install the latest release, please\n# consult with https://www.rabbitmq.com/which-erlang.html first\nnode['erlang']['install_method'] = \"esl\"\n```\n\nto provision a specific version, e.g. `24.3.3`:\n\n``` ruby\nnode['erlang']['install_method'] = \"esl\"\n# Ubuntu and Debian\n# note the \"1:\" package epoch prefix\nnode['erlang']['esl']['version'] = \"1:24.3.3\"\n```\n\n``` ruby\nnode['erlang']['install_method'] = \"esl\"\n# CentOS, RHEL, Fedora\nnode['erlang']['esl']['version'] = \"24.3.3-1\"\n```\n\n### Seting RabbitMQ Version\n\nSet `node['rabbitmq']['version']` to specify a version:\n\n``` ruby\nnode['rabbitmq']['version'] = \"3.9.14\"\n```\n\nIf you have `node['rabbitmq']['deb_package_url']` or `node['rabbitmq']['rpm_package_url']` overridden\nfrom earlier versions, consider omitting those attributes. Otherwise see a section on download\nlocation customization below.\n\nRabbitMQ packages will be downloaded [from Cloudsmith](https://cloudsmith.io/~rabbitmq/repos/).\n\n\n## Recipes\n\n### default\n\nInstalls `rabbitmq-server` via direct download (from Bintray or GitHub, depending on the version) of\nthe installation package or using the distribution version. Depending on your distribution,\nthe provided version may be quite old so direct download is the default option.\n\n#### Clustering Essentials\n\nSet the `['rabbitmq']['clustering']['enable']` attribute to `true`, `['rabbitmq']['clustering']['cluster_disk_nodes']`\narray of `node@host` strings that describe cluster members,\nand a alphanumeric string for the [`erlang_cookie`](https://www.rabbitmq.com/clustering.html#erlang-cookie).\n\n#### TLS\n\nTo enable [TLS for client connections](https://www.rabbitmq.com/ssl.html), set the `ssl` to `true` and set the paths to your cacert, cert and key files.\n\n``` ruby\nnode['rabbitmq']['ssl'] = true\n# path to the CA bundle file\nnode['rabbitmq']['ssl_cacert'] = '/path/to/cacert.pem'\n# path to the server certificate (pubic key) PEM file\nnode['rabbitmq']['ssl_cert'] = '/path/to/cert.pem'\n# path to the server private key file\nnode['rabbitmq']['ssl_key'] = '/path/to/key.pem'\n```\n\n#### Client Connection Listeners\n\n[TCP connection listeners](https://rabbitmq.com/networking.html) may be limited to a specific interface\nusing the `node['rabbitmq']['tcp_listen_interface']` attribute.\n\nIts [TLS connection listener](https://rabbitmq.com/networking.html) counterpart is `node['rabbitmq']['ssl_listen_interface']`.\n\n\n#### Custom Package Download Locations\n\n`node['rabbitmq']['deb_package_url']` and `node['rabbitmq']['rpm_package_url']` can be used\nto override the package download location. They configure a prefix without a version.\nSet them to a download location without a version if you want to provision from a custom\nendpoint such as a local mirror.\n\nThe `default` recipe will append a version suffix that matches RabbitMQ tag naming scheme.\nFor `3.7.x` or later, it is just the version (the value is used as is).\n\nLastly, a package name will be appended to form a full download URL. They rarely need\nchanging but can also be overridden using the `node['rabbitmq']['deb_package']`\nand `node['rabbitmq']['rpm_package']` attributes.\n\n\n#### Attributes\n\nA full list of attributes related to [TLS in RabbitMQ](https://www.rabbitmq.com/ssl.html)\ncan be found in [attributes/default.rb](attributes/default.rb).\n\nDefault values and usage information of important attributes are shown below.  More attributes are documented in metadata.rb.\n\n##### Username and Password\n\nThe default username and password are `guest`/`guest`, with [access limited to localhost connections](https://www.rabbitmq.com/access-control.html#loopback-users):\n\n``` ruby\n['rabbitmq']['default_user'] = 'guest'\n['rabbitmq']['default_pass'] = 'guest'\n```\n\nIt is [highly recommended](https://www.rabbitmq.com/production-checklist.html#users-and-permissions) that a different\ndefault user name is used with a reasonably long (say, 30-40 characters) **generated password**.\n\n##### Loopback Users\n\nBy default, the guest user [can only connect from localhost](https://www.rabbitmq.com/access-control.html#loopback-users).\nThis prevents remote access for installations that use the well-known default credentials.\nIt is [highly recommended](https://www.rabbitmq.com/production-checklist.html#users-and-permissions) that remote access for the default user is not enabled\nbut if **security is of absolutely no importance** in a certain environment, this can be done:\n\n``` ruby\n['rabbitmq']['loopback_users'] = []\n```\n\nLearn more in the RabbitMQ [Access Control guide](https://www.rabbitmq.com/access-control.html).\n\n##### Definitions Import\n\nIt is possible to to load a [definitions (schema) file](https://www.rabbitmq.com/definitions.html) on node boot.\nConsult RabbitMQ's [Definitions](https://www.rabbitmq.com/definitions.html)\nand [Backup](https://www.rabbitmq.com/backup.html) doc guides to learn more.\n\nTo configure definition loading, set the following attribute:\n\n`['rabbitmq']['management']['load_definitions'] = true`\n\nBy default, the node will be configured to load a JSON at `/etc/rabbitmq/load_definitions.json`;\nhowever, you can define another path if you'd prefer using the following attribute:\n\n`['rabbitmq']['management']['definitions_file'] = '/path/to/your/definitions.json'`\n\nIn order to use this functionality, you will need to provision a file referenced by the above attribute\nbefore you execute any recipes in the RabbitMQ cookbook (in other words, before the node starts). For example, this can be done\nusing a remote file resource.\n\n### management_ui\n\nInstalls the [RabbitMQ management plugin]().\n\nTo enable HTTPS for the management UI and HTTP API, set `['rabbitmq']['web_console_ssl']` attribute to `true`.\nThe HTTPS port for the management UI can be configured by setting attribute `['rabbitmq']['web_console_ssl_port']`,\nwhose default value is 15671.\n\n### plugins\n\nEnables any plugins listed in the `node['rabbitmq']['enabled_plugins']` and disables any listed\nin `node['rabbitmq']['disabled_plugins']` attributes.\n\n### LDAP Configuration\n\nTo enable the [LDAP plugin](https://www.rabbitmq.com/ldap.html), a few attributes have to be used\nin combination:\n\n1. Set `node['rabbitmq']['ldap']['enabled'] = true`\n2. Enable `auth_backends`: `node['rabbitmq']['auth_backends'] = 'rabbit_auth_backend_internal,rabbit_auth_backend_ldap'`\n3. Enable the `rabbitmq_auth_backend_ldap` plugin\n4. Configure LDAP servers and queries via the `node['rabbitmq']['ldap']['conf']` variable\n\n##### Example configuration\n\n``` ruby\n\n# this is just an example\nnode['rabbitmq']['ldap']['conf'] = {\n  :servers =\u003e [\"ldap-host1\", \"ldap-host2\"],\n  :user_bind_pattern =\u003e \"${username}@\u003cdomain\u003e\",\n  :dn_lookup_attribute =\u003e \"sAMAccountName\",\n  :dn_lookup_base =\u003e \"DC=\u003cCHANGEME\u003e,DC=\u003cCHANGEME\u003e\",\n  :port =\u003e \u003cCHANGEME (number)\u003e,\n  :log =\u003e \u003cCHANGEME (boolean)\u003e,\n  :vhost_access_query =\u003e '{constant, true}',\n  :topic_access_query =\u003e '{constant, true}',\n  :resource_access_query =\u003e '{constant, true}',\n  :tag_queries =\u003e \"[{administrator, {constant, false}}]\"\n  }\n```\n\n\n### users\n\nEnables any [RabbitMQ users](https://www.rabbitmq.com/access-control.html) listed in the `node['rabbitmq']['enabled_users']` and disables any listed in `node['rabbitmq']['disabled_users']` attributes.\nYou can provide user credentials, the vhosts that they need to have access to and the permissions that should be allocated to each user.\n\n``` ruby\nnode['rabbitmq']['enabled_users'] = [\n    {\n        :name =\u003e 'kitten',\n        :password =\u003e 'kitten',\n        :tag =\u003e 'leader',\n        :rights =\u003e [\n            {\n                :vhost =\u003e 'nova',\n                :conf =\u003e '.*',\n                :write =\u003e '.*',\n                :read =\u003e '.*'\n            }\n        ]\n    }\n]\n```\n\nNote that with this approach user credentials will be stored in the attribute file.\nUsing encrypted data bags is therefore highly recommended.\n\nAlternatively [definitions export and import](https://www.rabbitmq.com/management.html#load-definitions) (see above) can be used.\nDefinition files contain password hashes since clear text values are not stored.\n\n### vhosts\n\nEnables any [virtual hosts](https://www.rabbitmq.com/vhosts.html) listed in the `node['rabbitmq']['virtualhosts']`\nand disables any listed in `node['rabbitmq']['disabled_virtualhosts']` attributes.\n\n### cluster\n\nForms a [cluster RabbitMQ of nodes](https://www.rabbitmq.com/clustering.html).\n\nIt supports two clustering modes: auto or manual.\n\n* Auto clustering: lists [cluster members in the RabbitMQ config file](https://www.rabbitmq.com/cluster-formation.html#peer-discovery-classic-config). Those are taken from lists the nodes `node['rabbitmq']['clustering']['cluster_nodes']`.\n* Manual clustering : joins cluter members using `rabbitmqctl join_cluster`.\n\n#### Attributes\n\n* `node['rabbitmq']['clustering']['enable']` : Default decision flag of clustering\n* `node['rabbitmq']['erlang_cookie']` : Same erlang cookie is required for the cluster\n* `node['rabbitmq']['clustering']['use_auto_clustering']` : Default is false. (manual clustering is default)\n* `node['rabbitmq']['clustering']['cluster_name']` : Name of cluster. default value is nil. In case of nil or '' is set for `cluster_name`, first node name in `node['rabbitmq']['clustering']['cluster_nodes']` attribute will be set for manual clustering. for the auto clustering, one of the node name will be set.\n* `node['rabbitmq']['clustering']['cluster_nodes']` : List of cluster nodes. it required node name and cluster node type. please refer to example in below.\n\nExample\n\n``` ruby\nnode['rabbitmq']['clustering']['enable'] = true\nnode['rabbitmq']['erlang_cookie'] = 'AnyAlphaNumericStringWillDo'\nnode['rabbitmq']['clustering']['cluster_partition_handling'] = 'pause_minority'\nnode['rabbitmq']['clustering']['use_auto_clustering'] = false\nnode['rabbitmq']['clustering']['cluster_name'] = 'qa_env'\nnode['rabbitmq']['clustering']['cluster_nodes'] = [\n    {\n        :name =\u003e 'rabbit@rabbit1'\n    },\n    {\n        :name =\u003e 'rabbit@rabbit2'\n    },\n    {\n        :name =\u003e 'rabbit@rabbit3'\n    }\n]\n```\n\n### policies\n\nEnables any policies listed in the `node['rabbitmq']['policies']` and disables any listed in `node['rabbitmq']['disabled_policies']` attributes.\n\nSee examples in attributes file.\n\n### community_plugins\n\nDownloads, installs and enables pre-built community plugins binaries.\n\nTo specify a plugin, set the attribute `node['rabbitmq']['community_plugins']['PLUGIN_NAME']` to `'{DOWNLOAD_URL}'`.\n\n\n## Available Resources/Providers\n\nThere are several LWRPs for interacting with RabbitMQ and a few setting up Erlang repositories\nand package.\n\n## erlang_apt_repository_on_cloudsmith\n\n`erlang_apt_repository_on_cloudsmith` sets up a [Debian package](https://www.rabbitmq.com/install-debian.html) repository [from Cloudsmith](https://cloudsmith.io/~rabbitmq/repos/rabbitmq-erlang/packages/).\nIt is a wrapper around the standard `apt_repository` resource provider.\n\nSee also [RabbitMQ Erlang Compatibility guide](https://www.rabbitmq.com/which-erlang.html).\n\n``` ruby\nrabbitmq_erlang_apt_repository_on_cloudsmith 'rabbitmq_erlang_repo_on_cloudsmith' do\n  distribution node['lsb']['codename'] unless node['lsb'].nil?\n\n  action :add\nend\n```\n\n## erlang_yum_repository_on_cloudsmith\n\n`erlang_apt_repository_on_cloudsmith` sets up an [RPM package](https://www.rabbitmq.com/install-rpm.html) repository [from Bintray](https://bintray.com/rabbitmq-erlang).\nIt is a wrapper around the standard `apt_repository` resource provider.\n\nSee also [RabbitMQ Erlang Compatibility guide](https://www.rabbitmq.com/which-erlang.html).\n\n``` ruby\nrabbitmq_erlang_yum_repository_on_cloudsmith 'rabbitmq_erlang' do\n  # for RHEL/CentOS 8+, Fedora. See https://www.rabbitmq.com/install-rpm.html.\n  baseurl 'https://dl.cloudsmith.io/public/rabbitmq/rabbitmq-erlang/rpm/el/8/$basearch'\n\n  action :add\nend\n```\n\n## erlang_package_from_cloudsmith\n\nInstall the package. Here's an example for Debian-based systems:\n\n``` ruby\nrabbitmq_erlang_package_from_cloudsmith 'rabbitmq_erlang' do\n  # This package version assumes a Debian-based distribution.\n  version '1:24.3.3-1'\n\n  action :install\nend\n```\n\nHere's another one for RPM-based ones:\n\n``` ruby\nrabbitmq_erlang_package_from_cloudsmith 'rabbitmq_erlang' do\n  version '24.3.3'\n\n  action :install\nend\n```\n\n## plugin\n\nEnables or disables a rabbitmq plugin. Plugins are not supported for releases prior to 2.7.0.\n\n- `:enable` enables a `plugin`\n- `:disable` disables a `plugin`\n\n### Examples\n\n``` ruby\nrabbitmq_plugin \"rabbitmq_stomp\" do\n  action :enable\nend\n```\n\n``` ruby\nrabbitmq_plugin \"rabbitmq_shovel\" do\n  action :disable\nend\n```\n\n## policy\n\nSets or clears a RabbitMQ [policy](https://www.rabbitmq.com/parameters.html#policies).\n\n- `:set` sets a `policy`\n- `:clear` clears a `policy`\n\n### Examples\n\n``` ruby\nrabbitmq_policy \"queue-length-limit\" do\n  pattern \"^limited\\\\.*\"\n  definition ({\"max-length\" =\u003e \"3000\"})\n  priority 1\n  action :set\nend\n```\n\n## user\n\nAdds and deletes [users](https://www.rabbitmq.com/access-control.html):\n\n- `:add` adds a `user` with a `password`\n- `:delete` deletes a `user`\n- `:set_permissions` sets the `permissions` for a `user`, `vhost` is optional\n- `:clear_permissions` clears the permissions for a `user`\n- `:set_tags` set the tags on a user\n- `:clear_tags` clear any tags on a user\n- `:change_password` set the `password` for a `user`\n\n### Examples\n\n``` ruby\nrabbitmq_user \"guest\" do\n  action :delete\nend\n```\n\n``` ruby\nrabbitmq_user \"nova\" do\n  password \"sekret\"\n  action :add\nend\n```\n\n``` ruby\nrabbitmq_user \"nova\" do\n  vhost \"/nova\"\n  permissions \".* .* .*\"\n  action :set_permissions\nend\n```\n\n``` ruby\nrabbitmq_user \"rmq\" do\n  vhost [\"/\", \"/rmq\", \"/nova\"]\n  permissions \".* .* .*\"\n  action :set_permissions\nend\n```\n\n``` ruby\nrabbitmq_user \"joe\" do\n  tag \"admin,lead\"\n  action :set_tags\nend\n```\n\n## vhost\n\nAdds and deletes [virtual hosts](https://www.rabbitmq.com/vhosts.html).\n\n- `:add` adds a `vhost`\n- `:delete` deletes a `vhost`\n\n### Examples\n\n``` ruby\nrabbitmq_vhost \"/nova\" do\n  action :add\nend\n```\n\n## cluster\n\n[Forms a cluster](https://www.rabbitmq.com/clustering.html) and controls cluster name.\nThis is an imperative version of [classic config peer discovery](https://www.rabbitmq.com/cluster-formation.html) in\nmodern RabbitMQ versions.\n\n- `:join` join in cluster as a manual clustering. node will join in first node of json string data.\n\n - cluster nodes as JSON: all cluster nodes should be listed.\n\n ``` json\n [\n     {\n         \"name\" : \"rabbit@rabbit1\",\n         \"type\" : \"disc\"\n     },\n     {\n         \"name\" : \"rabbit@rabbit2\",\n         \"type\":  \"disc\"\n     },\n     {\n         \"name\" \"rabbit@rabbit3\",\n         \"type\" : \"disc\"\n     }\n]\n ```\n\n- `:set_cluster_name` set the cluster name\n\n### Examples\n\n``` ruby\nrabbitmq_cluster '[{\"name\":\"rabbit@rabbit1\", \"type\":\"disc\"},{\"name\":\"rabbit@rabbit2\", \"type\":\"disc\"},{\"name\":\"rabbit@rabbit3\", \"type\":\"disc\"}]' do\n  action :join\nend\n```\n\n``` ruby\nrabbitmq_cluster '[{\"name\":\"rabbit@rabbit1\",\"type\":\"disc\"},{\"name\":\"rabbit@rabbit2\", ,\"type\":\"disc\"},{\"name\":\"rabbit@rabbit3\",\"type\":\"disc\"}]' do\n  cluster_name 'seoul_tokyo_newyork'\n  action :set_cluster_name\nend\n```\n\n``` ruby\nrabbitmq_cluster '[{\"name\":\"rabbit@rabbit1\",\"type\":\"disc\"},{\"name\":\"rabbit@rabbit2\", ,\"type\":\"disc\"},{\"name\":\"rabbit@rabbit3\",\"type\":\"disc\"}]' do\n  action :change_cluster_node_type\nend\n```\n\n### Removing Nodes from an Existing Cluster\n\nThis cookbook provides the primitives to remove a node from a cluster via helper functions but do not include these in any recipes. This is something that is potentially very dangerous and different deployments will have different needs and IF you decide you need this it should be implemented in your wrapper with EXTREME caution. There are 2 helper methods for 2 different scenario:\n- removing self from cluster. This should likely only be considered for machines on a normal decommission. This is accomplished by using the helper fucntion `reset_current_node`.\n- removing another node from cluster. This should only be done once you are sure the machine is gone and won't come back. This can be accomplished via `remove_remote_node_from_cluster`.\n\n\n## Limitations\n\nFor an already running cluster, these actions still require manual intervention:\n\n- changing the [shared cluster secret](https://www.rabbitmq.com/clustering.html#erlang-cookie) using the `:erlang_cookie` attribute\n- disabling clutering entirely by setting `:cluster` from `true` to `false`\n\n\n## License \u0026 Authors\n\n- Author:: Benjamin Black\n- Author:: Daniel DeLeo\n- Author:: Matt Ray\n- Author:: Seth Thomas\n- Author:: JJ Asghar\n- Author:: Team RabbitMQ\n\n```text\nCopyright (c) 2009-2018, Chef Software, Inc.\nCopyright (c) 2018-2021, VMware, Inc. or its affiliates.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n    https://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frabbitmq%2Fchef-cookbook","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frabbitmq%2Fchef-cookbook","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frabbitmq%2Fchef-cookbook/lists"}