Hi all,
In the post, I only describe how to install and configure Pacemaker nodes. Once your Pacemaker cluster is up, you could use the CRM command via the shell to deploy your primitives. I have written shell scripts in the past to do that.
For example, assuming that you want to deploy a primitive for HA Proxy with a floating IP address, you have a file called haproxy-stack with the following content:
primitive haproxy ocf:heartbeat:haproxy params conffile=/etc/haproxy/haproxy.cfg op monitor interval=30s
primitive haproxy-ip ocf:heartbeat:IPaddr2 params ip="10.162.20.107" cidr_netmask="24" op monitor interval="2s"
group haproxy-stack haproxy-ip haproxy
Send that file to the cluster nodes, then from a node within your cluster, run (via the shell) the crm command to update the cluster configuration with the content of the file:
crm configure load update haproxy-stack
You can use Ansible to template and push the file to the Pacemaker nodes, and use the shell module to load the snippet into the crm. I have not tried that last step but it should work.
I hope this helps.
Guillaume.