{"id":19871908,"url":"https://github.com/saltstack-formulas/haproxy-formula","last_synced_at":"2025-07-11T10:07:15.475Z","repository":{"id":1123529,"uuid":"10653664","full_name":"saltstack-formulas/haproxy-formula","owner":"saltstack-formulas","description":null,"archived":false,"fork":false,"pushed_at":"2025-04-07T20:01:27.000Z","size":320,"stargazers_count":28,"open_issues_count":11,"forks_count":119,"subscribers_count":37,"default_branch":"master","last_synced_at":"2025-04-07T21:22:11.787Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://docs.saltstack.com/en/latest/topics/development/conventions/formulas.html","language":"Jinja","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/saltstack-formulas.png","metadata":{"files":{"readme":"docs/README.rst","changelog":"CHANGELOG.md","contributing":null,"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":"AUTHORS.md","dei":null,"publiccode":null,"codemeta":null}},"created_at":"2013-06-12T22:19:53.000Z","updated_at":"2025-03-06T10:57:37.000Z","dependencies_parsed_at":"2025-01-07T04:18:35.287Z","dependency_job_id":null,"html_url":"https://github.com/saltstack-formulas/haproxy-formula","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/saltstack-formulas/haproxy-formula","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saltstack-formulas%2Fhaproxy-formula","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saltstack-formulas%2Fhaproxy-formula/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saltstack-formulas%2Fhaproxy-formula/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saltstack-formulas%2Fhaproxy-formula/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/saltstack-formulas","download_url":"https://codeload.github.com/saltstack-formulas/haproxy-formula/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saltstack-formulas%2Fhaproxy-formula/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264781086,"owners_count":23662790,"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":"2024-11-12T16:13:57.739Z","updated_at":"2025-07-11T10:07:15.459Z","avatar_url":"https://github.com/saltstack-formulas.png","language":"Jinja","funding_links":[],"categories":[],"sub_categories":[],"readme":".. _readme:\n\nhaproxy-formula\n===============\n\n|img_travis| |img_sr|\n\n.. |img_travis| image:: https://travis-ci.com/saltstack-formulas/haproxy-formula.svg?branch=master\n   :alt: Travis CI Build Status\n   :scale: 100%\n   :target: https://travis-ci.com/saltstack-formulas/haproxy-formula\n.. |img_sr| image:: https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg\n   :alt: Semantic Release\n   :scale: 100%\n   :target: https://github.com/semantic-release/semantic-release\n\nInstall, configure and run ``haproxy``.\n\n.. contents:: **Table of Contents**\n   :depth: 1\n\nGeneral notes\n-------------\n\nSee the full `SaltStack Formulas installation and usage instructions\n\u003chttps://docs.saltstack.com/en/latest/topics/development/conventions/formulas.html\u003e`_.\n\nIf you are interested in writing or contributing to formulas, please pay attention to the `Writing Formula Section\n\u003chttps://docs.saltstack.com/en/latest/topics/development/conventions/formulas.html#writing-formulas\u003e`_.\n\nIf you want to use this formula, please pay attention to the ``FORMULA`` file and/or ``git tag``,\nwhich contains the currently released version. This formula is versioned according to `Semantic Versioning \u003chttp://semver.org/\u003e`_.\n\nSee `Formula Versioning Section \u003chttps://docs.saltstack.com/en/latest/topics/development/conventions/formulas.html#versioning\u003e`_ for more details.\n\nIf you need (non-default) configuration, please pay attention to the ``pillar.example`` file and/or `Special notes`_ section.\n\nContributing to this repo\n-------------------------\n\n**Commit message formatting is significant!!**\n\nPlease see `How to contribute \u003chttps://github.com/saltstack-formulas/.github/blob/master/CONTRIBUTING.rst\u003e`_ for more details.\n\nSpecial notes\n-------------\n\nUse the supplied haproxy.cfg for a flat file approach,\nor the jinja template and the pillar for a salt approach.\n\nAvailable states\n----------------\n\n.. contents::\n   :local:\n\n``haproxy``\n^^^^^^^^^^^^\n\n*Meta-state (This is a state that includes other states)*.\n\nThis installs the haproxy package,\nmanages the haproxy configuration file and then\nstarts the associated haproxy service.\n\n``haproxy.install``\n^^^^^^^^^^^^^^^^^^^^\n\nThis state will install the haproxy package only.\n\n``haproxy.config``\n^^^^^^^^^^^^^^^^^^^\n\nThis state will configure the haproxy service and has a dependency on ``haproxy.install``\nvia include list.\n\nCurrently, only a handful of options can be set using the pillar:\n\n- Global\n\n  + stats: enable stats, currently only via a unix socket which can be set to a path with custom permissions and optional extra bind arguments\n  + user: sets the user haproxy shall run as\n  + group: sets the group haproxy shall run as\n  + chroot: allows you to turn on chroot and set a directory\n  + daemon: allows you to turn daemon mode on and off\n\n- Default\n\n  + log: set the default log\n  + mode: sets the mode (i.e. http)\n  + retries: sets the number of retries\n  + options: an array of options that is simply looped with no special treatment\n  + timeouts: an array of timeouts that is simply looped with no special treatment\n  + errorfiles: an array of k:v errorfiles to point to the correct file matching an HTTP error code\n\n- Frontend; Frontend(s) is a list of the frontends you desire to have in your haproxy setup\n  Per frontend you can set:\n\n  + name: the name haproxy will use for the frontend\n  + bind: the bind string: this allows you to set the IP, Port and other paramters for the bind\n  + redirect: add a redirect line, an unparsed string like in the backend\n  + reqadd: an array of reqadd statements. Looped over and put in the configuration, no parsing\n  + default_backend: sets the default backend\n  + acls: a list of acls, not parsed, simply looped and put in to the configuration\n  + blocks: a list of block statements, not parsed, simply looped and put in to the configuration\n  + use_backends: a list of use_backend statements, looped over, not parsed\n\n- Backend; Backend(s) is a list of the backends you desire to have in your haproxy setup, per backend you can set:\n\n  + name: set the backend name, used in the frontend references by haproxy\n  + balance: set the balance type, string\n  + redirect: if set, can be used to redirect; simply a string, not parsed\n  + servers: a list of servers this backend will contact, is looped over; per server you can set:\n\n    + name: name of the server for haproxy\n    + host: the host to be contacted\n    + port: the port to contact the server on\n    + check: set to check to enable checking\n\n- For global, default, frontend, listener, backend and server it is possible to use the \"extra\" option for more rare settings not mentioned above.\n\n``haproxy.service``\n^^^^^^^^^^^^^^^^^^^^\n\nThis state will start the haproxy service and has a dependency on ``haproxy.config``\nvia include list.\n\nTesting\n-------\n\nLinux testing is done with ``kitchen-salt``.\n\nRequirements\n^^^^^^^^^^^^\n\n* Ruby\n* Docker\n\n.. code-block:: bash\n\n   $ gem install bundler\n   $ bundle install\n   $ bin/kitchen test [platform]\n\nWhere ``[platform]`` is the platform name defined in ``kitchen.yml``,\ne.g. ``debian-9-2019-2-py3``.\n\n``bin/kitchen converge``\n^^^^^^^^^^^^^^^^^^^^^^^^\n\nCreates the docker instance and runs the ``haproxy`` main state, ready for testing.\n\n``bin/kitchen verify``\n^^^^^^^^^^^^^^^^^^^^^^\n\nRuns the ``inspec`` tests on the actual instance.\n\n``bin/kitchen destroy``\n^^^^^^^^^^^^^^^^^^^^^^^\n\nRemoves the docker instance.\n\n``bin/kitchen test``\n^^^^^^^^^^^^^^^^^^^^\n\nRuns all of the stages above in one go: i.e. ``destroy`` + ``converge`` + ``verify`` + ``destroy``.\n\n``bin/kitchen login``\n^^^^^^^^^^^^^^^^^^^^^\n\nGives you SSH access to the instance for manual testing.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsaltstack-formulas%2Fhaproxy-formula","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsaltstack-formulas%2Fhaproxy-formula","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsaltstack-formulas%2Fhaproxy-formula/lists"}