<commit_before># test file for haproxy
---
- hosts: all
  remote_user: vagrant
  sudo: true
  roles:
    - haproxy
  vars:
    # ssl (file) map
    haproxy_ssl_map:
      - src: ../../../files/haproxy/etc/haproxy/ssl/star-taalzee-nl.pem
        dest: /etc/ssl/private/star-rekentuin-nl.pem
      - src: ../../../files/haproxy/etc/haproxy/ssl/star-taalzee-nl.pem
        dest: /etc/ssl/private/star-taalzee-nl.pem
      - src: ../../../files/haproxy/etc/haproxy/ssl/star-wordsandbirds-nl.pem
        dest: /etc/ssl/private/star-wordsandbirds-nl.pem

    # listen section
    haproxy_listen:
      - name: stats
        description: Global statistics
        bind: '127.0.0.1:1936'
        mode: http
        stats:
          enable: true
          uri: /
          hide_version: true
          refresh: 5s
          auth:
            - user: admin
              passwd: <PASSWORD>'
        ssl:
          - crt: star-taalzee-nl.pem

    # front-end section
    haproxy_frontend:
      - name: http
        description: Front-end for all HTTP traffic
        bind: '0.0.0.0:80'
        mode: http
        default_backend: webservers
      - name: https
        description: Front-end for all HTTPS traffic
        bind: '0.0.0.0:443'
        ssl:
          - crt: star-rekentuin-nl.pem
          - crt: star-taalzee-nl.pem
          - crt: star-wordsandbirds-nl.pem
        mode: http
        default_backend: webservers
        rspadd:
          - string: 'Strict-Transport-Security:\ max-age=15768000'
            # cond:

    # back-end section
    haproxy_backend:
      - name: webservers
        description: Back-end with all (Apache) webservers
        mode: http
        balance: roundrobin
        option:
          - forwardfor
          - 'httpchk HEAD / HTTP/1.1\r\nHost:localhost'
        http_request:
          - action: 'set-header'
            param: 'X-Forwarded-Port %[dst_port]'
          - action: 'add-header'
            param: 'X-Forwarded-Proto https'
            cond: 'if { ssl_fc }'
        server:
          - name: web01
            ip: 127.0.0.1
            port: 8001
            # maxconn: 501
            params:
              - check
          - name: web02
            ip: 127.0.0.1
            port: 8002
            # maxconn: 502
            params:
              - check
          - name: web03
            ip: 127.0.0.1
            port: 8003
            # maxconn: 503
            params:
              - check
          - name: web04
            ip: 127.0.0.1
            port: 8004
            # maxconn: 504
            params:
              - check<commit_msg>Removal of vagrant test data<commit_after># test file for haproxy
---
- hosts: all
  remote_user: vagrant
  sudo: true
  roles:
    - haproxy
{'fraction_non_alphanumeric': 0.10852148579752367, 'fraction_numerical': 0.03423160961398398, 'mean_word_length': 1.3084033613445378, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 7, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6914436', 'n_tokens_mistral': 976, 'n_tokens_neox': 903, 'n_words': 192}