--- # file: roles/haproxy/tasks/install.yml - name: Add Apt Repositories apt_repository: repo: '{{ item }}' state: present mode: 0644 with_items: - ppa:vbernat/haproxy-1.8 - name: Install some packages apt: pkg: '{{ packages }}' state: latest vars: packages: - haproxy - hatop - socat - name: create directories file: dest: '{{ item }}' state: directory mode: 0755 with_items: - /etc/haproxy/certs - /etc/haproxy/update - name: Install hatop shortcut copy: src: usr_local_bin_hatop dest: /usr/local/bin/hatop owner: root group: root mode: 0755 - name: Install log rotator copy: src: etc_logrotate_d_haproxy dest: /etc/logrotate.d/haproxy owner: root group: root mode: 0644 tags: - logrotate - name: Install script to read socket template: src: hasocket dest: /usr/local/bin/hasocket owner: root group: root mode: 0755 - name: Install error response files copy: src: '{{ item }}.http' dest: /etc/haproxy/errors/{{ item }}.http owner: root group: root mode: 0644 with_items: - '500' - '502' - '503' - '504'