--- - name: Install LB for galera cluster hosts: 1.1.1.1, 2.2.2.2, 3.3.3.3 become: yes gather_facts: yes vars_files: - loadBalancers.vars.yaml pre_tasks: - name: update apt: upgrade: no update_cache: yes cache_valid_time: 14400 #4h - name: upgrade apt: upgrade: yes - name: apt dist-upgrade apt: upgrade: dist - name: remove hanging packages and clean repos apt: autoremove: true autoclean: true tasks: - name: Install dependencies apt: state: present name: - wget - curl - keepalived - haproxy - sudo - name: Create keepalivedusr - name: copy chck_haproxy.sh - name: set exec perms on chck_haproxy.sh - name: copy haproxy config - name: copy keepalived config - name: restart haproxy - name: restart keepalived - name: template to copy from