You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
homelab/haproxy.yml

44 lines
873 B

9 months ago
- name: Setup HAProxy
hosts: all
become: yes
become_method: sudo
become_user: root
tasks:
- name: Install pacemaker
package:
name: pacemaker
state: absent
- name: Install corosync
package:
name: corosync
state: absent
- name: Install pcs
package:
name: pcs
state: absent
- name: Install fence-agents
package:
name: fence-agents
state: absent
- name: append hosts to etc_hosts
blockinfile:
state: present
dest: /etc/hosts
block: |
'10.10.0.21 k8s-pi-01'
'10.10.0.22 k8s-pi-02'
9 months ago
- name: Start pcsd
service:
9 months ago
name: pcsd
enabled: false
state: false
9 months ago
- name: Install package
package:
name: haproxy
state: present
- name: Start HAProxy
service:
name: haproxy
enabled: true
9 months ago
state: started