{"id":16709305,"url":"https://github.com/mrlesmithjr/ansible-pacemaker","last_synced_at":"2025-08-05T23:32:31.374Z","repository":{"id":142637340,"uuid":"46107901","full_name":"mrlesmithjr/ansible-pacemaker","owner":"mrlesmithjr","description":null,"archived":false,"fork":false,"pushed_at":"2021-04-23T17:16:10.000Z","size":23,"stargazers_count":16,"open_issues_count":0,"forks_count":15,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-04-10T05:40:26.297Z","etag":null,"topics":["ansible","ansible-role","cluster","pacemaker"],"latest_commit_sha":null,"homepage":null,"language":"Jinja","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mrlesmithjr.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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}},"created_at":"2015-11-13T07:52:32.000Z","updated_at":"2023-04-26T21:24:32.000Z","dependencies_parsed_at":null,"dependency_job_id":"e0b03375-7a58-4286-a30c-7549aa9cfe3a","html_url":"https://github.com/mrlesmithjr/ansible-pacemaker","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/mrlesmithjr/ansible-pacemaker","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrlesmithjr%2Fansible-pacemaker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrlesmithjr%2Fansible-pacemaker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrlesmithjr%2Fansible-pacemaker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrlesmithjr%2Fansible-pacemaker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mrlesmithjr","download_url":"https://codeload.github.com/mrlesmithjr/ansible-pacemaker/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrlesmithjr%2Fansible-pacemaker/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268992715,"owners_count":24341547,"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-08-05T02:00:12.334Z","response_time":2576,"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":["ansible","ansible-role","cluster","pacemaker"],"created_at":"2024-10-12T20:04:30.645Z","updated_at":"2025-08-05T23:32:31.300Z","avatar_url":"https://github.com/mrlesmithjr.png","language":"Jinja","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003c!-- START doctoc generated TOC please keep comment here to allow auto update --\u003e\n\u003c!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE --\u003e\n\u003c!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE --\u003e\n\n- [ansible-pacemaker](#ansible-pacemaker)\n  - [Requirements](#requirements)\n    - [Pacemaker cluster](#pacemaker-cluster)\n      - [Number of Nodes](#number-of-nodes)\n    - [OS requirements](#os-requirements)\n      - [macOS](#macos)\n  - [Role Variables](#role-variables)\n  - [Dependencies](#dependencies)\n  - [Example Playbook](#example-playbook)\n  - [License](#license)\n  - [Author Information](#author-information)\n\n\u003c!-- END doctoc generated TOC please keep comment here to allow auto update --\u003e\n\n# ansible-pacemaker\n\nAn [Ansible](https://www.ansible.com) role to install/configure [pacemaker/corosync](http://clusterlabs.org).\n\n## Requirements\n\n### Pacemaker cluster\n\nThe following requirements are specific requirements for cluster setup.\n\n#### Number of Nodes\n\n-   Up to 16 nodes per cluster.\n-   Minimum number of nodes: 3.\n-   2 nodes cluster could be configured but is not recommended.\n\n### OS requirements\n\nThe following requirements are specific to OS deployments.\n\n#### macOS\n\n-   [Python passlib module](http://docs.ansible.com/ansible/faq.html#how-do-i-generate-crypted-passwords-for-the-user-module)\n\n```bash\npip install passlib\n```\n\n## Role Variables\n\n```yaml\n---\n# defaults file for ansible-pacemaker\ncorosync_authkey_file: '/etc/corosync/authkey'\n\n# Defines interface used for cluster\ncorosync_bindnet_interface: 'enp0s8'\n\ncorosync_config_file: '/etc/corosync/corosync.conf'\n\n# Defines the number of nodes to be functional in order to avoid split-brain\n# scenarios...ex. 2-nodes = 1, 3-nodes = 2\ncorosync_expected_votes: \"{{ ( groups[pacemaker_cluster_group]|count /2 ) | round (0, 'ceil') | int }}\"\n\n# Corosync itself works without a cluster name, but DLM needs one.\n# The cluster name is also written into the VG metadata of newly\n# created shared LVM volume groups, if lvmlockd uses DLM locking.\n# It is also used for computing mcastaddr, unless overridden below.\ncorosync_cluster_name: 'debian'\n\n# Setting corosync_last_man_standing to true enables the Last Man Standing (LMS) feature;\n# by default, it is disabled (set to false)\ncorosync_last_man_standing: true\n\n# Define multicast address to use for cluster\n# this should be unique per cluster\ncorosync_mcastaddr: 239.255.42.1\n\n# Define port number to configure as cluster port.\ncorosync_mcastport: 5405\n\n# Defines if unicast mode should be used rather than multicast\ncorosync_unicast_mode: false\n\n# Means that, When starting up a cluster (all nodes down), the cluster quorum\n# is held until all nodes are online and have joined the cluster for the first\n# time. This parameter is new in Corosync 2.0.\ncorosync_wait_for_all: true\n\npacemaker_cluster_constraints: []\n  # - constraint: 'colocation'\n  #   action: 'add'\n  #   source_resource_id: 'webserver'\n  #   target_resource_id: 'virtual_ip'\n  #   score: 'INFINITY'\n  # - constraint: 'order'\n  #   order:\n  #     first_resource: 'virtual_ip'\n  #     first_resource_action: 'start'\n  #     second_resource: 'webserver'\n  #     second_resource_action: 'start'\n\npacemaker_cluster_group: 'ha_cluster'\n\npacemaker_cluster_resources: []\n  # - resource_id: 'virtual_ip'\n  #   action: 'create'\n  #   provider: 'ocf:heartbeat:IPaddr2'\n  #   options:\n  #     - 'ip=192.168.250.200'\n  #     - 'cidr_netmask=24'\n  #   op: 'monitor'\n  #   op_options:\n  #     - 'interval=30s'\n  # - resource_id: 'webserver'\n  #   action: 'create'\n  #   provider: 'ocf:heartbeat:nginx'\n  #   options:\n  #     - 'configfile=/etc/nginx/nginx.conf'\n  #   op: 'monitor'\n  #   op_options:\n  #     - 'timeout=5s'\n  #     - 'interval=5s'\n\n# NOT RECOMMENDED FOR PRODUCTION!!!!!\n# You must have a STONITH device to enable....\npacemaker_disable_stonith: true\n\n# Define specific cluster settings to configure\npacemaker_cluster_settings: []\n  # - property: 'start-failure-is-fatal'\n  #   value: 'false'\n  # - property: 'pe-warn-series-max'\n  #   value: 1000\n  # - property: 'pe-input-series-max'\n  #   value: 1000\n  # - property: 'pe-error-series-max'\n  #   value: 1000\n  # - property: 'cluster-recheck-interval'\n  #   value: 5min\n\n# Define hacluster user password for webUI\n#\n# Generate new password\n# echo \"haclusteradmin\" | sha512sum\npacemaker_hacluster_password: 'f8d1feb7105dfbd2859a17512c7414f89b70dfef815b177444b897edec19a18724f8e9686f0e2daa41c48eb9b0511bae9e659a756f17c39fedb6d68b9230a53c'\n\n# Defines if host is considered to be primary\n# this should be set in host_vars/hostname as true for only one host\npacemaker_primary_server: '{{ groups[pacemaker_cluster_group][0] }}'\n```\n\n## Dependencies\n\nNone\n\n## Example Playbook\n\n```yaml\n---\n- hosts: ha_cluster\n  vars:\n    etc_hosts_add_all_hosts: true\n    pacemaker_cluster_constraints:\n      - constraint: 'colocation'\n        action: 'add'\n        source_resource_id: 'webserver'\n        target_resource_id: 'virtual_ip'\n        score: 'INFINITY'\n      - constraint: 'order'\n        order:\n          first_resource: 'virtual_ip'\n          first_resource_action: 'start'\n          second_resource: 'webserver'\n          second_resource_action: 'start'\n    pacemaker_cluster_resources:\n      - resource_id: 'virtual_ip'\n        action: 'create'\n        provider: 'ocf:heartbeat:IPaddr2'\n        options:\n          - 'ip=192.168.250.200'\n          - 'cidr_netmask=24'\n        op: 'monitor'\n        op_options:\n          - 'interval=30s'\n      - resource_id: 'webserver'\n        action: 'create'\n        provider: 'ocf:heartbeat:nginx'\n        options:\n          - 'configfile=/etc/nginx/nginx.conf'\n        op: 'monitor'\n        op_options:\n          - 'timeout=5s'\n          - 'interval=5s'\n    pacemaker_cluster_settings:\n      - property: 'start-failure-is-fatal'\n        value: 'false'\n      - property: 'pe-warn-series-max'\n        value: 1000\n      - property: 'pe-input-series-max'\n        value: 1000\n      - property: 'pe-error-series-max'\n        value: 1000\n      - property: 'cluster-recheck-interval'\n        value: 5min\n    pri_domain_name: 'test.vagrant.local'\n  roles:\n    - role: ansible-apt-sources\n    - role: ansible-motd\n    - role: ansible-ntp\n    - role: ansible-timezone\n      become: true\n    - role: ansible-etc-hosts\n    - role: ansible-pacemaker\n      tags:\n        - pacemaker\n    - role: ansible-nginx\n  tasks:\n```\n\n## License\n\nMIT\n\n## Author Information\n\nLarry Smith Jr.\n\n-   [@mrlesmithjr](https://www.twitter.com/mrlesmithjr)\n-   [EverythingShouldBeVirtual](http://everythingshouldbevirtual.com)\n-   mrlesmithjr [at] gmail.com\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmrlesmithjr%2Fansible-pacemaker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmrlesmithjr%2Fansible-pacemaker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmrlesmithjr%2Fansible-pacemaker/lists"}