Skip to content
Snippets Groups Projects
install.yml 955 B
Newer Older
  • Learn to ignore specific revisions
  • ---
    # file: roles/haproxy/tasks/install.yml
    
    
      apt_repository:
        repo='{{ item }}'
        state=present
    
        - "ppa:vbernat/haproxy-1.7"
    
      apt:
        pkg='{{ item }}'
        state=installed
      with_items:
        - haproxy
        - hatop
        - socat
    
    
      file:
        dest='{{ item }}'
        state=directory
        mode='755'
      with_items:
        - /etc/haproxy/certs
        - /etc/haproxy/update
    
    
      copy:
        src='usr_local_bin_hatop'
        dest='/usr/local/bin/hatop'
        owner='root'
        group='root'
        mode='755'
    
    
      copy:
        src='etc_logrotate_d_haproxy'
        dest='/etc/logrotate.d/haproxy'
        owner='root'
        group='root'
        mode='644'
    
    - name: "Install script to read socket"
    
      template:
        src='hasocket'
        dest='/usr/local/bin/hasocket'
        owner='root'
        group='root'
        mode='755'