<commit_before>---
- hosts: prod-lb
  user: root
  roles:
   - { role: base, tags: [ 'base' ] }
   - { role: papertrail, tags: [ 'papertrail' ] }
   - { role: certbot, tags: [ 'certbot' ] }
   - { role: varnish, tags: [ 'varnish' ] }
   - { role: nginx, tags: [ 'nginx' ] }
   - { role: sslterminator, tags: [ 'sslterminator' ] }
   - { role: monit, tags: [ 'monit' ] }
   - { role: newrelic-infra, tags: [ 'newrelic-infra' ] }
   - { role: newrelic-sysmon, tags: [ 'newrelic-sysmon' ] }

  vars_files:
  - prod-vars.yml

  vars:

    ## Base ##

    # On default we disable iptables but we want option to keep it on for customer-servers without external firewall
    #disable_iptables: True


    ## Letsencrypt ##

    certbot_email: "{{ support_email }}"
    certbot_domains:
      - "{{ domain1_name }}"
      - "www.{{ domain1_name }}"
      - "{{ domain2_name }}"
      - "www.{{ domain2_name }}"
    certbot_renewal_docroot: /var/www/letsencrypt-auto
    #certbot_commands: allows yo uto customize the command to run, see ansible/playbook/roles/certbot/defaults/main.yml


    ## Varnish ##

    # This server also acts as a load balancer
    varnish:
      port: 8081
      memory: 1G
      # Basic configuration for error pages
      #error_header_cache_control: "no-cache, max-age: 0, must-revalidate"
      error_header_x_site_name: "{{ project_name }}"
      error_header_x_sitetitle: "{{ project_name }}"
      error_header_x_ua: "insert_GA_code"
      # It's possible to define custom error page template with
      #custom_error_template:
      # you can also set the control_key
      control_key: "{{ varnish_control_key }}"
      probe_resource_url: "_ping.php"
      acl_internal:
        - ip: 172.16.17.32
        - ip: 192.168.3.11
        - ip: 172.16.58.3
        - ip: 192.168.127.12
        - ip: 172.16.58.3
      acl_purge:
        - ip: 127.0.0.1
        - ip: "{{ front1_ip }}"
        - ip: "{{ front2_ip }}"
      acl_upstream_proxy:
        - ip: 127.0.0.1<commit_msg>Enable basicauth by default on prod too.<commit_after>---
- hosts: prod-lb
  user: root
  roles:
   - { role: base, tags: [ 'base' ] }
   - { role: papertrail, tags: [ 'papertrail' ] }
   - { role: certbot, tags: [ 'certbot' ] }
   - { role: varnish, tags: [ 'varnish' ] }
   - { role: nginx, tags: [ 'nginx' ] }
   - { role: sslterminator, tags: [ 'sslterminator' ] }
   - { role: monit, tags: [ 'monit' ] }
   - { role: newrelic-infra, tags: [ 'newrelic-infra' ] }
   - { role: newrelic-sysmon, tags: [ 'newrelic-sysmon' ] }

  vars_files:
  - prod-vars.yml

  vars:

    ## Base ##

    # On default we disable iptables but we want option to keep it on for customer-servers without external firewall
    #disable_iptables: True


    ## Letsencrypt ##

    certbot_email: "{{ support_email }}"
    certbot_domains:
      - "{{ domain1_name }}"
      - "www.{{ domain1_name }}"
      - "{{ domain2_name }}"
      - "www.{{ domain2_name }}"
    certbot_renewal_docroot: /var/www/letsencrypt-auto
    #certbot_commands: allows yo uto customize the command to run, see ansible/playbook/roles/certbot/defaults/main.yml

    # We need to make sure not to leak sites ahead of launch 
    basicauth_enabled: True
    basicauth_credentials:
      - username: wunder
        password: <PASSWORD>
    # Basic auth can also be disabled for certain ip's
    basicauth_ip:
      - address: 172.16.17.32
      - address: 192.168.3.11
      - address: 172.16.58.3
      - address: 192.168.127.12
      - address: 172.16.58.3



    ## Varnish ##

    # This server also acts as a load balancer
    varnish:
      port: 8081
      memory: 1G
      # Basic configuration for error pages
      #error_header_cache_control: "no-cache, max-age: 0, must-revalidate"
      error_header_x_site_name: "{{ project_name }}"
      error_header_x_sitetitle: "{{ project_name }}"
      error_header_x_ua: "insert_GA_code"
      # It's possible to define custom error page template with
      #custom_error_template:
      # you can also set the control_key
      control_key: "{{ varnish_control_key }}"
      probe_resource_url: "_ping.php"
      acl_internal:
        - ip: 172.16.17.32
        - ip: 192.168.3.11
        - ip: 172.16.58.3
        - ip: 192.168.127.12
        - ip: 172.16.58.3
      acl_purge:
        - ip: 127.0.0.1
        - ip: "{{ front1_ip }}"
        - ip: "{{ front2_ip }}"
      acl_upstream_proxy:
        - ip: 127.0.0.1
{'fraction_non_alphanumeric': 0.13491525423728815, 'fraction_numerical': 0.04135593220338983, 'mean_word_length': 2.3103964098728498, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 6, 'xml': 0}, 'pii_count': 19, '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': '4070488', 'n_tokens_mistral': 1734, 'n_tokens_neox': 1571, 'n_words': 364}