Skip to content
Snippets Groups Projects
Select Git revision
  • fc67424700a9963f1fb9a1f5d32b64ce05fa9182
  • master default protected
  • renovate/configure
  • feature/http-errors
  • fix/bionic-url-for-disco
  • feature/acl-in-defaults
  • v2.0.1
  • v2.0.0
  • v1.16.0
  • v1.15.0
  • v1.14.0
  • v1.13.0
  • v1.12.1
  • v1.12.0
  • v1.11.0
  • v1.10.0
  • v1.9.1
  • v1.9.0
  • v1.8
  • v1.8.0
  • v1.7
  • v1.6
  • v1.5
  • v1.4
  • v1.3
  • v1.2
26 results

install.yml

Blame
  • David Mehren's avatar
    David Mehren authored
    fc674247
    History
    Code owners
    Assign users and groups as approvers for specific file changes. Learn more.
    install.yml 1.47 KiB
    ---
    
    - name: Add HAProxy 2.6 PPA
      apt_repository:
        repo: 'ppa:vbernat/haproxy-2.6'
        state: present
    
    - name: Remove HAProxy 2.5 PPA
      apt_repository:
        repo: 'ppa:vbernat/haproxy-2.5'
        state: absent
    
    - name: Remove HAProxy 2.4 PPA
      apt_repository:
        repo: 'ppa:vbernat/haproxy-2.4'
        state: absent
    
    - name: Remove HAProxy 2.3 PPA
      apt_repository:
        repo: 'ppa:vbernat/haproxy-2.3'
        state: absent
    
    - name: Remove HAProxy 2.2 PPA
      apt_repository:
        repo: 'ppa:vbernat/haproxy-2.2'
        state: absent
    
    - name: Remove HAProxy 2.1 PPA
      apt_repository:
        repo: 'ppa:vbernat/haproxy-2.1'
        state: absent
    
    - name: Remove HAProxy 2.0 PPA
      apt_repository:
        repo: 'ppa:vbernat/haproxy-2.0'
        state: absent
    
    - name: Remove HAProxy 1.8 PPA
      apt_repository:
        repo: 'ppa:vbernat/haproxy-1.8'
        state: absent
    
    - name: Install HAProxy
      apt:
        name: "haproxy=2.6.*"
        state: present
        update_cache: yes
    
    - name: 'Enable haproxy unit'
      systemd:
        name: haproxy
        enabled: yes
    
    - name: 'Ensure chroot directory exists'
      file:
        name: "{{ haproxy_global.chroot }}"
        state: directory
      when: haproxy_global.chroot is defined and haproxy_global.chroot
    
    - name: Create service override directory
      file:
        path: /etc/systemd/system/haproxy.service.d
        state: directory
    
    - name: Copy service override
      copy:
        dest: /etc/systemd/system/haproxy.service.d/override.conf
        content: |
          [Unit]
          Wants=network-online.target